Announcement Announcement Module
No announcement yet.
Access Authentication from CallbackHandler Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

    Thanks in advance for you time and effort taken to answer my question!

  • #2
    I think the easiest solution would be to create your own callback handler, and put your own logic therein.


    • #3
      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.