Interface UserPasswordCallback
@Deprecated public interface UserPasswordCallback
Deprecated.
Use {@see 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.
-
Field Summary
Fields Modifier and Type Field Description static int
AcceptPermanently
Deprecated.Accept the connection to the server forever.static int
AcceptTemporary
Deprecated.Accept the connection to the server once.static int
Reject
Deprecated.Reject the connection to the server. -
Method Summary
Modifier and Type Method Description String
askQuestion(String realm, String question, boolean showAnswer)
Deprecated.ask the user a question where she answers with a text.String
askQuestion(String realm, String question, boolean showAnswer, boolean maySave)
Deprecated.Ask the user a question, and (usually) store the auth credential caching preference specified bymaySave
(used byuserAllowedSave()
).int
askTrustSSLServer(String info, boolean allowPermanently)
Deprecated.If there are problems with the certifcate of the SSL-server, this callback will be used to deside if the connection will be used.boolean
askYesNo(String realm, String question, boolean yesIsDefault)
Deprecated.ask the user a yes/no questionString
getPassword()
Deprecated.retrieve the password entered during the prompt callString
getUsername()
Deprecated.retrieve the username entered during the prompt callboolean
prompt(String realm, String username)
Deprecated.Ask the user for username and password The entered username/password is retrieved by the getUsername getPasswort methods.boolean
prompt(String realm, String username, boolean maySave)
Deprecated.Request a user name and password from the user, and (usually) store the auth credential caching preference specified bymaySave
(used byuserAllowedSave()
).boolean
userAllowedSave()
Deprecated.
-
Field Details
-
Reject
Deprecated.Reject the connection to the server.- See Also:
- Constant Field Values
-
AcceptTemporary
Deprecated.Accept the connection to the server once.- See Also:
- Constant Field Values
-
AcceptPermanently
Deprecated.Accept the connection to the server forever.- See Also:
- Constant Field Values
-
-
Method Details
-
askTrustSSLServer
Deprecated.If there are problems with the certifcate of the SSL-server, this callback will be used to deside if the connection will be used.- Parameters:
info
- the probblems with the certificate.allowPermanently
- if AcceptPermantly is a legal answer- Returns:
- one of Reject/AcceptTemporary/AcceptPermanently
-
prompt
Deprecated.Ask the user for username and password The entered username/password is retrieved by the getUsername getPasswort methods.- Parameters:
realm
- for which server realm this information is requested.username
- the default username- Returns:
- Whether the prompt for authentication credentials was successful (e.g. in a GUI application whether the dialog box was canceled).
-
askYesNo
Deprecated.ask the user a yes/no question- Parameters:
realm
- for which server realm this information is requested.question
- question to be askedyesIsDefault
- if yes should be the default- Returns:
- the answer
-
askQuestion
Deprecated.ask the user a question where she answers with a text.- Parameters:
realm
- for which server realm this information is requested.question
- question to be askedshowAnswer
- if the answer is shown or hidden- Returns:
- the entered text or null if canceled
-
getUsername
String getUsername()Deprecated.retrieve the username entered during the prompt call- Returns:
- the username
-
getPassword
String getPassword()Deprecated.retrieve the password entered during the prompt call- Returns:
- the password
-
prompt
Deprecated.Request a user name and password from the user, and (usually) store the auth credential caching preference specified bymaySave
(used byuserAllowedSave()
). 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).- Parameters:
realm
- The realm from which the question originates.username
- The name of the user inrealm
.maySave
- Whether caching of credentials is allowed. Usually affects the return value of theuserAllowedSave()
method.- Returns:
- Whether the prompt for authentication credentials was successful (e.g. in a GUI application whether the dialog box was canceled).
-
askQuestion
Deprecated.Ask the user a question, and (usually) store the auth credential caching preference specified bymaySave
(used byuserAllowedSave()
). 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).- Parameters:
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 theuserAllowedSave()
method.- Returns:
- answer as entered or null if canceled
-
userAllowedSave
boolean userAllowedSave()Deprecated.- Returns:
- Whether the caller allowed caching of credentials the
last time
prompt(String, String, boolean)
was called. Applications wanting to emulate the behavior of--no-auth-cache
will probably always returnfalse
.
-