org.springframework.security.authentication.jaas
Class JaasPasswordCallbackHandler

java.lang.Object
  extended by org.springframework.security.authentication.jaas.JaasPasswordCallbackHandler
All Implemented Interfaces:
JaasAuthenticationCallbackHandler

public class JaasPasswordCallbackHandler
extends Object
implements JaasAuthenticationCallbackHandler

The most basic Callbacks to be handled when using a LoginContext from JAAS, are the NameCallback and PasswordCallback. Spring Security provides the JaasPasswordCallbackHandler specifically tailored to handling the PasswordCallback.

See Also:
Callback, PasswordCallback

Constructor Summary
JaasPasswordCallbackHandler()
           
 
Method Summary
 void handle(Callback callback, Authentication auth)
          If the callback passed to the 'handle' method is an instance of PasswordCallback, the JaasPasswordCallbackHandler will call, callback.setPassword(authentication.getCredentials().toString()).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaasPasswordCallbackHandler

public JaasPasswordCallbackHandler()
Method Detail

handle

public void handle(Callback callback,
                   Authentication auth)
            throws IOException,
                   UnsupportedCallbackException
If the callback passed to the 'handle' method is an instance of PasswordCallback, the JaasPasswordCallbackHandler will call, callback.setPassword(authentication.getCredentials().toString()).

Specified by:
handle in interface JaasAuthenticationCallbackHandler
Parameters:
callback -
auth -
Throws:
IOException
UnsupportedCallbackException