I needed to send in a few extra "details" along with the authenticate request, so what I am wanting to do is use authenicate(userId,
String .valueOf(authentication.getCredentials()), extrainfo1, extrainfo2, extrainfo3, extrainfo4) instead of authenticate(userId, Strig .valueOf(authentication.getCredentials()).
All the extra info is information I need to pull from the request (user-agent). I am able to use a custom filter and get these from the request but I am not being able to find a way past the spring security classes so that I can pass these variables to the class that calls authenticate method.
In the class I am using the authenticate method, I don't have access to the request or the session ( out of the filter chain ). I have access to authentication which is of type UserNamePassWordAuthenticationToken from Spring security. What is my question is how to access the session information from within this class when all that is passed in from spring security is :
1. username.
2. authentication ( class UserNamePasswordAuthenticationToken)