Implementation of the JAAS CallbackHandler interface, used to negotiate delivery of the username and
credentials that were specified to our constructor. No interaction with the user is required (or possible).
This CallbackHandler will pre-digest the supplied password, if required by the
<Realm> element in server.xml.
At present, JAASCallbackHandler knows how to handle callbacks of type
javax.security.auth.callback.NameCallback and
javax.security.auth.callback.PasswordCallback.
| Modifier and Type | Field and Description |
|---|---|
| protected final String | authMethod
The authentication method to be used. |
| protected final String | cnonce
Client generated nonce. |
| protected final String | digestA2
Second digest. |
| protected final String | nc
Nonce count. |
| protected final String | nonce
Server generated nonce. |
| protected final String | password
The password to be authenticated with. |
| protected final String | qop
Quality of protection applied to the message. |
| protected final JAASRealm | realm
The associated |
| protected final String | realmName
Realm name. |
| protected static final StringManager | sm
The string manager for this package. |
| protected final String | username
The username to be authenticated with. |
| Access | Constructor and Description |
|---|---|
| public | JAASCallbackHandler(JAASRealm
Our associated JAASRealm instance realm, String Username to be authenticated with username, String Password to be authenticated with password)Construct a callback handler configured with the specified values. |
| public | JAASCallbackHandler(JAASRealm
Our associated JAASRealm instance realm, String Username to be authenticated with username, String Password to be authenticated with password, String Server generated nonce nonce, String Nonce count nc, String Client generated nonce cnonce, String Quality of protection applied to the message qop, String Realm name realmName, String Second digest calculated as digest(Method + ":" + uri) digestA2, String The digest algorithm to use algorithm, String The authentication method in use authMethod)Construct a callback handler for DIGEST authentication. |
| Modifier and Type | Method and Description |
|---|---|
| public void | handle(Callback[]
The set of callbacks)Callbacks to be processedImplements javax. Retrieve the information requested in the provided |
| authMethod | back to summary |
|---|---|
| protected final String authMethod The authentication method to be used. If null, assume BASIC/FORM. | |
| cnonce | back to summary |
|---|---|
| protected final String cnonce Client generated nonce. | |
| digestA2 | back to summary |
|---|---|
| protected final String digestA2 Second digest. | |
| nc | back to summary |
|---|---|
| protected final String nc Nonce count. | |
| nonce | back to summary |
|---|---|
| protected final String nonce Server generated nonce. | |
| password | back to summary |
|---|---|
| protected final String password The password to be authenticated with. | |
| qop | back to summary |
|---|---|
| protected final String qop Quality of protection applied to the message. | |
| realm | back to summary |
|---|---|
| protected final JAASRealm realm The associated | |
| realmName | back to summary |
|---|---|
| protected final String realmName Realm name. | |
| sm | back to summary |
|---|---|
| protected static final StringManager sm The string manager for this package. | |
| username | back to summary |
|---|---|
| protected final String username The username to be authenticated with. | |
| JAASCallbackHandler | back to summary |
|---|---|
| public JAASCallbackHandler(JAASRealm realm, String username, String password) Construct a callback handler configured with the specified values. Note that if the | |
| JAASCallbackHandler | back to summary |
|---|---|
| public JAASCallbackHandler(JAASRealm realm, String username, String password, String nonce, String nc, String cnonce, String qop, String realmName, String digestA2, String algorithm, String authMethod) Construct a callback handler for DIGEST authentication.
| |
| handle | back to summary |
|---|---|
| public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException Implements javax. Retrieve the information requested in the provided
| |