public interface UserInfo
Session
to allow for feedback to the user and
retrieving information (e.g. passwords, passphrases or a confirmation)
from the user.
If an object of this interface also implements
UIKeyboardInteractive
, it can also be used for
keyboard-interactive authentication as described in
RFC 4256.
Most of the examples include an implementation of this
interface based on Swings JOptionPane
.
Modifier and Type | Method and Description |
---|---|
String |
getPassphrase()
Returns the passphrase entered by the user.
|
String |
getPassword()
Returns the password entered by the user.
|
boolean |
promptPassphrase(String message)
Prompts the user for a passphrase for a public key.
|
boolean |
promptPassword(String message)
Prompts the user for a password used for authentication for
the remote server.
|
boolean |
promptYesNo(String message)
Prompts the user to answer a yes-no-question.
|
void |
showMessage(String message)
Shows an informational message to the user.
|
boolean promptPassword(String message)
message
- the prompt string to be shown to the user.getPassword()
.String getPassword()
promptPassword(java.lang.String)
.boolean promptPassphrase(String message)
message
- the prompt message to be shown to the user.getPassphrase()
.String getPassphrase()
promptPassphrase(java.lang.String)
.boolean promptYesNo(String message)
Note: These are currently used to decide whether to create nonexisting files or directories, whether to replace an existing host key, and whether to connect despite a non-matching key.
message
- the prompt message to be shown to the user.true
if the user answered with "Yes", else false
.void showMessage(String message)
message
- the message to show to the user.This is an inofficial Javadoc created by PaĆlo Ebermann. Have a look at the official homepage.