Apr 20th, 2008, 06:42 PM
Access Authentication from CallbackHandler
Is it possible, and if yes, how, to access Authentication object, that was passed to authentication manager, from a callback handler, before successful authentication, so before it gets stored in SecurityContextHolder's context? I'd like to use it to fill in Username token. For more details on the context for the question see another thread I've created on Spring RCP forum http://forum.springframework.org/showthread.php?t=52976
Thanks in advance for you time and effort taken to answer my question!
Apr 24th, 2008, 05:59 AM
I think the easiest solution would be to create your own callback handler, and put your own logic therein.
Apr 24th, 2008, 08:24 AM
Well, I have. Problem is that a callback handler can not access Authentication that is passed to doLogin of authentication manager, and getAuthentication only returns Authentication after sucessful authentication. I intend to use AOP, before doLogin method, to store Authentication in security context, so it gets available to a callback handler.