public interface AuthnCallback
The interface for requesting authentication credentials from the user. Should the javahl bindings need the matching information, these methodes will be called.
This callback can also be used to provide the equivalent of the
--no-auth-cache
and --non-interactive
arguments accepted by the command-line client.
Modifier and Type | Interface and Description |
---|---|
static class |
AuthnCallback.AuthnResult
Abstract base class for callback results.
|
static class |
AuthnCallback.SSLClientCertPassphraseResult
The result type used by
sslClientCertPassphrasePrompt(java.lang.String, boolean) . |
static class |
AuthnCallback.SSLClientCertResult
The result type used by
sslClientCertPrompt(java.lang.String, boolean) . |
static class |
AuthnCallback.SSLServerCertFailures
Information about why parsing a server SSL certificate failed.
|
static class |
AuthnCallback.SSLServerCertInfo
Detailed information about the parsed server SSL certificate.
|
static class |
AuthnCallback.SSLServerTrustResult
|
static class |
AuthnCallback.UsernameResult
The result type used by
usernamePrompt(java.lang.String, boolean) . |
static class |
AuthnCallback.UserPasswordResult
The result type used by
userPasswordPrompt(java.lang.String, java.lang.String, boolean) . |
Modifier and Type | Method and Description |
---|---|
boolean |
allowStorePlaintextPassphrase(java.lang.String realm)
Ask if a certificate passphrase may be stored on disk in plaintext.
|
boolean |
allowStorePlaintextPassword(java.lang.String realm)
Ask if a password may be stored on disk in plaintext.
|
AuthnCallback.SSLClientCertPassphraseResult |
sslClientCertPassphrasePrompt(java.lang.String realm,
boolean maySave)
Ask for passphrase for decrypting a client SSL certificate.
|
AuthnCallback.SSLClientCertResult |
sslClientCertPrompt(java.lang.String realm,
boolean maySave)
Ask for the (local) file name of a client SSL certificate.
|
AuthnCallback.SSLServerTrustResult |
sslServerTrustPrompt(java.lang.String realm,
AuthnCallback.SSLServerCertFailures failures,
AuthnCallback.SSLServerCertInfo info,
boolean maySave)
Ask if we trust the server certificate.
|
AuthnCallback.UsernameResult |
usernamePrompt(java.lang.String realm,
boolean maySave)
Ask for a username.
|
AuthnCallback.UserPasswordResult |
userPasswordPrompt(java.lang.String realm,
java.lang.String username,
boolean maySave)
Ask for a username and password.
|
AuthnCallback.UsernameResult usernamePrompt(java.lang.String realm, boolean maySave)
realm
- The realm from which the question originates.maySave
- Indiceates whether saving credentials is allowed;
if false
, the maySave
flag
in the return value will be ignored.null
if cancelled.AuthnCallback.UserPasswordResult userPasswordPrompt(java.lang.String realm, java.lang.String username, boolean maySave)
realm
- The realm from which the question originates.username
- The username for the realm, if known; may be null
.maySave
- Indiceates whether saving credentials is allowed;
if false
, the maySave
flag
in the return value will be ignored.null
if cancelled.AuthnCallback.SSLServerTrustResult sslServerTrustPrompt(java.lang.String realm, AuthnCallback.SSLServerCertFailures failures, AuthnCallback.SSLServerCertInfo info, boolean maySave)
realm
- The realm from which the question originates.failures
- The result of parsing the certificate;
if null
, there were no failures.info
- Information extracted from the certificate.maySave
- Indiceates whether saving credentials is allowed;
if false
, the maySave
flag
in the return value will be ignored.null
if cancelled.AuthnCallback.SSLClientCertResult sslClientCertPrompt(java.lang.String realm, boolean maySave)
realm
- The realm from which the question originates.maySave
- Indiceates whether saving credentials is allowed;
if false
, the maySave
flag
in the return value will be ignored.null
if cancelled.AuthnCallback.SSLClientCertPassphraseResult sslClientCertPassphrasePrompt(java.lang.String realm, boolean maySave)
realm
- The realm from which the question originates.maySave
- Indiceates whether saving credentials is allowed;
if false
, the maySave
flag
in the return value will be ignored.null
if cancelled.boolean allowStorePlaintextPassword(java.lang.String realm)
realm
- The realm from which the question originates.true
if the password may be stored in plaintext.boolean allowStorePlaintextPassphrase(java.lang.String realm)
realm
- The realm from which the question originates.true
if the passphrase may be stored in plaintext.