public interface PromptUserPassword3 extends PromptUserPassword2
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.
AccecptTemporary, AcceptPermanently, AcceptTemporary, Reject
Modifier and Type | Method and Description |
---|---|
java.lang.String |
askQuestion(java.lang.String realm,
java.lang.String question,
boolean showAnswer,
boolean maySave)
Ask the user a question, and (usually) store the auth
credential caching preference specified by
maySave
(used by userAllowedSave() ). |
boolean |
prompt(java.lang.String realm,
java.lang.String username,
boolean maySave)
Request a user name and password from the user, and (usually)
store the auth credential caching preference specified by
maySave (used by userAllowedSave() ). |
boolean |
userAllowedSave() |
askTrustSSLServer
askQuestion, askYesNo, getPassword, getUsername, prompt
boolean prompt(java.lang.String realm, java.lang.String username, boolean maySave)
maySave
(used by userAllowedSave()
).
Applications wanting to emulate the behavior of
--non-interactive
will implement this method in a
manner which does not require user interaction (e.g. a no-op
which assumes pre-cached auth credentials).realm
- The realm from which the question originates.username
- The name of the user in realm
.maySave
- Whether caching of credentials is allowed.
Usually affects the return value of the userAllowedSave()
method.java.lang.String askQuestion(java.lang.String realm, java.lang.String question, boolean showAnswer, boolean maySave)
maySave
(used by userAllowedSave()
). Applications wanting to
emulate the behavior of --non-interactive
will
implement this method in a manner which does not require user
interaction (e.g. a no-op).realm
- The realm from which the question originates.question
- The text of the question.showAnswer
- Whether the answer may be displayed.maySave
- Whether caching of credentials is allowed.
Usually affects the return value of the userAllowedSave()
method.boolean userAllowedSave()
prompt(String, String, boolean)
was called.
Applications wanting to emulate the behavior of
--no-auth-cache
will probably always return
false
.