Package org.jboss.security.auth.callback
Class JBossCallbackHandler
- java.lang.Object
-
- org.jboss.security.auth.callback.JBossCallbackHandler
-
- All Implemented Interfaces:
Serializable
,CallbackHandler
- Direct Known Subclasses:
JASPICallbackHandler
public class JBossCallbackHandler extends Object implements CallbackHandler, Serializable
Serializable Callback Handler- Since:
- 25 November 2008
- Author:
- Anil.Saldhana@redhat.com
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JBossCallbackHandler()
JBossCallbackHandler(Principal principal, Object credential)
Initialize the UsernamePasswordHandler with the principal and credentials to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(Callback[] callbacks)
Handles SecurityAssociationCallback, ObjectCallback, NameCallback and PasswordCallback types.protected void
handleCallBack(Callback c)
Handle aCallback
void
setSecurityInfo(Principal principal, Object credential)
-
-
-
Method Detail
-
handle
public void handle(Callback[] callbacks) throws UnsupportedCallbackException, IOException
Handles SecurityAssociationCallback, ObjectCallback, NameCallback and PasswordCallback types. A NameCallback name property is set to the Prinicpal.getName() value. A PasswordCallback password property is set to the getPassword() value. The preferred SecurityAssociationCallback has its principal and credential properties set to the instance principal and credential. An ObjectCallback has its credential set to the credential value.- Specified by:
handle
in interfaceCallbackHandler
- Throws:
UnsupportedCallbackException
- - thrown if any callback of type other than SecurityAssociationCallback, ObjectCallback, NameCallback or PasswordCallback are seen.IOException
- See Also:
getPassword()
-
handleCallBack
protected void handleCallBack(Callback c) throws UnsupportedCallbackException
Handle aCallback
- Parameters:
c
- callback- Throws:
UnsupportedCallbackException
- If the callback is not supported by this handler
-
-