public class NameAppNameHandler extends java.lang.Object implements AFCallbackHandler
NameCallback and AppNameCallback. All
data is provided in the constructor of this handler.| Constructor and Description |
|---|
NameAppNameHandler(java.lang.String userName,
java.lang.String appName)
Creates a new handler for
NameCallback and AppNameCallback. |
| Modifier and Type | Method and Description |
|---|---|
javax.security.auth.callback.Callback[] |
handle(javax.security.auth.callback.Callback[] callbacks)
This method is similar to
CallbackHandler.handle(Callback[]) but returns the provided callbacks back
to the caller. |
public NameAppNameHandler(java.lang.String userName,
java.lang.String appName)
NameCallback and AppNameCallback.userName - The unique name of the user to log on. This must not be null nor
an empty/blank string. Note that this name is case-sensitive!appName - The application name for which to log on. This may be null.public javax.security.auth.callback.Callback[] handle(javax.security.auth.callback.Callback[] callbacks)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
AFCallbackHandlerCallbackHandler.handle(Callback[]) but returns the provided callbacks back
to the caller. This allows for calling this method remotely. Note that all
callbacks need to be serialisable. handle in interface AFCallbackHandlercallbacks - The callbacks to be handled by this callback handler.java.io.IOException - If an input or output error occurs, an
IOException will be thrown.javax.security.auth.callback.UnsupportedCallbackException - If the implementation of this method
does not support one or more of the callbacks specified in the
callbacks parameter, an
UnsupportedCallbackException will be thrown.