public class UsernamePasswordAuthHandler
extends java.lang.Object
implements javax.security.auth.callback.CallbackHandler
| Constructor and Description |
|---|
UsernamePasswordAuthHandler(java.lang.String username,
char[] password)
Creates a callback handler from a username and password that can be used to log into
CloudHSM.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handle(javax.security.auth.callback.Callback[] callbacks)
Sets this
CallbackHandler's authentication strategy from a collection of Callbacks. |
public UsernamePasswordAuthHandler(java.lang.String username,
char[] password)
throws FailedLoginException
username - The username to be used.password - The password represented as a character array. This character array will be
zeroed after login.FailedLoginExceptionpublic void handle(javax.security.auth.callback.Callback[] callbacks)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
CallbackHandler's authentication strategy from a collection of Callbacks.handle in interface javax.security.auth.callback.CallbackHandlercallbacks - an array of Callback objects provided by an underlying security
service which contains the information requested to be retrieved or displayed.java.io.IOException - Never.javax.security.auth.callback.UnsupportedCallbackException - Never.