Interface AuthnCallback
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.
- Since:
- 1.9
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAuthnCallback.AuthnResultAbstract base class for callback results.static classAuthnCallback.SSLClientCertPassphraseResultThe result type used by {@see #sslClientCertPassphrasePrompt}.static classAuthnCallback.SSLClientCertResultThe result type used by {@see #sslClientCertPrompt}.static classAuthnCallback.SSLServerCertFailuresInformation about why parsing a server SSL certificate failed.static classAuthnCallback.SSLServerCertInfoDetailed information about the parsed server SSL certificate.static classAuthnCallback.SSLServerTrustResultThe result type used by {@see #sslServerTrustPrompt}.static classAuthnCallback.UsernameResultThe result type used by {@see #usernamePrompt}.static classAuthnCallback.UserPasswordResultThe result type used by {@see #userPasswordPrompt}. -
Method Summary
Modifier and Type Method Description booleanallowStorePlaintextPassphrase(String realm)Ask if a certificate passphrase may be stored on disk in plaintext.booleanallowStorePlaintextPassword(String realm)Ask if a password may be stored on disk in plaintext.AuthnCallback.SSLClientCertPassphraseResultsslClientCertPassphrasePrompt(String realm, boolean maySave)Ask for passphrase for decrypting a client SSL certificate.AuthnCallback.SSLClientCertResultsslClientCertPrompt(String realm, boolean maySave)Ask for the (local) file name of a client SSL certificate.AuthnCallback.SSLServerTrustResultsslServerTrustPrompt(String realm, AuthnCallback.SSLServerCertFailures failures, AuthnCallback.SSLServerCertInfo info, boolean maySave)Ask if we trust the server certificate.AuthnCallback.UsernameResultusernamePrompt(String realm, boolean maySave)Ask for a username.AuthnCallback.UserPasswordResultuserPasswordPrompt(String realm, String username, boolean maySave)Ask for a username and password.
-
Method Details
-
usernamePrompt
Ask for a username.- Parameters:
realm- The realm from which the question originates.maySave- Indiceates whether saving credentials is allowed; iffalse, themaySaveflag in the return value will be ignored.- Returns:
- The result, or
nullif cancelled.
-
userPasswordPrompt
AuthnCallback.UserPasswordResult userPasswordPrompt(String realm, String username, boolean maySave)Ask for a username and password.- Parameters:
realm- The realm from which the question originates.username- The username for the realm, if known; may benull.maySave- Indiceates whether saving credentials is allowed; iffalse, themaySaveflag in the return value will be ignored.- Returns:
- The result, or
nullif cancelled.
-
sslServerTrustPrompt
AuthnCallback.SSLServerTrustResult sslServerTrustPrompt(String realm, AuthnCallback.SSLServerCertFailures failures, AuthnCallback.SSLServerCertInfo info, boolean maySave)Ask if we trust the server certificate.- Parameters:
realm- The realm from which the question originates.failures- The result of parsing the certificate; ifnull, there were no failures.info- Information extracted from the certificate.maySave- Indiceates whether saving credentials is allowed; iffalse, themaySaveflag in the return value will be ignored.- Returns:
- The result, or
nullif cancelled.
-
sslClientCertPrompt
Ask for the (local) file name of a client SSL certificate.- Parameters:
realm- The realm from which the question originates.maySave- Indiceates whether saving credentials is allowed; iffalse, themaySaveflag in the return value will be ignored.- Returns:
- The result, or
nullif cancelled.
-
sslClientCertPassphrasePrompt
AuthnCallback.SSLClientCertPassphraseResult sslClientCertPassphrasePrompt(String realm, boolean maySave)Ask for passphrase for decrypting a client SSL certificate.- Parameters:
realm- The realm from which the question originates.maySave- Indiceates whether saving credentials is allowed; iffalse, themaySaveflag in the return value will be ignored.- Returns:
- The result, or
nullif cancelled.
-
allowStorePlaintextPassword
Ask if a password may be stored on disk in plaintext.- Parameters:
realm- The realm from which the question originates.- Returns:
trueif the password may be stored in plaintext.
-
allowStorePlaintextPassphrase
Ask if a certificate passphrase may be stored on disk in plaintext.- Parameters:
realm- The realm from which the question originates.- Returns:
trueif the passphrase may be stored in plaintext.
-