Hi,

I created a custom CallbackHandler, handed it to the LoginContext. 

        CallbackHandler cbHandler = new SsoTokenCallbackHandler(username, 
password.toCharArray());

        try {
  |             LoginContext lc = new LoginContext("my-ctx", cbHandler);
  |             lc.login();
  |             result = true;
  |         } catch (LoginException e) {
  |             log.error("Exception during login.", e);
  |             result = false;
  |         }
  | 

The problem: the initialize() method of my LoginModule I'm getting called 
twice: 
1) the first time with my custom callback handler (SsoTokenCallbackHandler). 
Here's what Eclipse is showing when debugging:
        callbackHandler LoginContext$SecureCallbackHandler  (id=142) 
  |                 acc AccessControlContext  (id=157) 
  |                 ch SsoTokenCallbackHandler  (id=159) 
  |                 
2) the second time with another callback handler which fails 
(SecurityAssociationHandler). Here's what Eclipse is showing when debugging:
        callbackHandler LoginContext$SecureCallbackHandler  (id=197) 
  |                 acc AccessControlContext  (id=201) 
  |                 ** ch SecurityAssociationHandler  (id=202) **
  |                 
Is it normal to be called twice ? What can I do to receive a single call in my 
LoginModule ? (the first one)

Thank you !

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032359#4032359

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032359
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to