|
Ganymed SSH-2 for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InteractiveCallback
An InteractiveCallback
is used to respond to challenges sent
by the server if authentication mode "keyboard-interactive" is selected.
Connection.authenticateWithKeyboardInteractive(String,
String[], InteractiveCallback)
Method Summary | |
---|---|
java.lang.String[] |
replyToChallenge(java.lang.String name,
java.lang.String instruction,
int numPrompts,
java.lang.String[] prompt,
boolean[] echo)
This callback interface is used during a "keyboard-interactive" authentication. |
Method Detail |
---|
java.lang.String[] replyToChallenge(java.lang.String name, java.lang.String instruction, int numPrompts, java.lang.String[] prompt, boolean[] echo) throws java.lang.Exception
Some copy-paste information from the standard: a command line interface (CLI) client SHOULD print the name and instruction (if non-empty), adding newlines. Then for each prompt in turn, the client SHOULD display the prompt and read the user input. The name and instruction fields MAY be empty strings, the client MUST be prepared to handle this correctly. The prompt field(s) MUST NOT be empty strings.
Please refer to draft-ietf-secsh-auth-kbdinteract-XX.txt for the details.
Note: clients SHOULD use control character filtering as discussed in RFC4251 to avoid attacks by including terminal control characters in the fields to be displayed.
name
- the name String sent by the server.instruction
- the instruction String sent by the server.numPrompts
- number of prompts - may be zero (in this case, you should just
return a String array of length zero).prompt
- an array (length numPrompts
) of Stringsecho
- an array (length numPrompts
) of booleans. For
each prompt, the corresponding echo field indicates whether or
not the user input should be echoed as characters are typed.
numPrompts
.
java.lang.Exception
|
Ganymed SSH-2 for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |