Mar 3rd, 2011, 07:11 PM
Manual Authentication in Forms app
I have an application that is currently using the standard forms style login that Spring Security offers. A filter chain is set up that automatically redirects to a login page, etc.
I now have a need in this same application to manually authenticate a user into the system when provided a username and password through a separate means, like passed in the query string, read from a file, etc. My hope was to intercept the request in the LoginRedirectFilter, inject the credentials into the context, then manually kick off the same doAuthentication method that is used when the login screen posts. I want to go this route to make sure all of the authority information gets loaded up for the user correctly. Is that possible?
If anyone has any example code of how to do it I would be grateful...I'm a bit stumped.
Tags for this Thread