Package org.jboss.security.auth.callback
Class UsernamePasswordHandler
- java.lang.Object
-
- org.jboss.security.auth.callback.UsernamePasswordHandler
-
- All Implemented Interfaces:
CallbackHandler
public class UsernamePasswordHandler extends Object implements CallbackHandler
A simple implementation of CallbackHandler that sets a username and password in the handle(Callback[]) method to that passed in to the constructor. This is suitable for environments that need non-interactive JAAS logins.- Version:
- $Revision$
- Author:
- Scott.Stark@jboss.org
- See Also:
CallbackHandler
,handle(Callback[])
-
-
Constructor Summary
Constructors Constructor Description UsernamePasswordHandler(String username, char[] password)
Initialize the UsernamePasswordHandler with the usernmae and password to use.UsernamePasswordHandler(String username, Object credential)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(Callback[] callbacks)
Sets any NameCallback name property to the instance username, sets any PasswordCallback password property to the instance, and any password.
-
-
-
Method Detail
-
handle
public void handle(Callback[] callbacks) throws UnsupportedCallbackException
Sets any NameCallback name property to the instance username, sets any PasswordCallback password property to the instance, and any password.- Specified by:
handle
in interfaceCallbackHandler
- Throws:
UnsupportedCallbackException
-
-