public interface UIKeyboardInteractive
keyboard-interactive
authentication.
This interface will be implemented by applications in
UserInfo
implementations to support keyboard-interactive
authentication as defined in RFC 4256.
Additionally, it is used in case of password-based authorization when the server requests a password change.
Most of the examples include an implementation of this
interface based on Swings JOptionPane
.
Modifier and Type | Method and Description |
---|---|
String[] |
promptKeyboardInteractive(String destination,
String name,
String instruction,
String[] prompt,
boolean[] echo)
Retrieves answers from the user to a number of questions.
|
String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo)
destination
- identifies the user/host pair where we want to login.
(This was not sent by the remote side).name
- the name of the request (could be shown in the
window title). This may be empty.instruction
- an instruction string to be shown to the user.
This may be empty, and may contain new-lines.prompt
- a list of prompt strings.echo
- for each prompt string, whether to show the
texts typed in (true
) or to mask them (false
).
This array will have the same length as prompt
.prompt
, if the user confirmed.
If the user cancels the input, the return value should be
null
.This is a simplified version of the inofficial Javadoc created by PaĆlo Ebermann. Have a look at the official homepage.