public interface UserInteraction
Modifier and Type | Field and Description |
---|---|
static UserInteraction |
NONE
A useful "placeholder" that indicates that no interaction is expected.
|
Modifier and Type | Method and Description |
---|---|
String |
getUpdatedPassword(ClientSession session,
String prompt,
String lang)
Invoked when the server returns an
SSH_MSG_USERAUTH_PASSWD_CHANGEREQ
response indicating that the password should be changed - e.g., expired or
not strong enough (as per the server's policy). |
String[] |
interactive(ClientSession session,
String name,
String instruction,
String lang,
String[] prompt,
boolean[] echo)
Invoked when "keyboard-interactive" authentication mechanism
is used in order to provide responses for the server's challenges
(a.k.a.
|
boolean |
isInteractionAllowed(ClientSession session) |
void |
welcome(ClientSession session,
String banner,
String lang)
Displays the welcome banner to the user.
|
static final UserInteraction NONE
IllegalStateException
is any of the interaction
methods is calledboolean isInteractionAllowed(ClientSession session)
session
- The ClientSession
true
if user interaction allowed for this sessionvoid welcome(ClientSession session, String banner, String lang)
session
- The ClientSession
through which the banner was receivedbanner
- The welcome bannerlang
- The banner language code - may be emptyString[] interactive(ClientSession session, String name, String instruction, String lang, String[] prompt, boolean[] echo)
session
- The ClientSession
through which the request was receivedname
- The interaction name (may be empty)instruction
- The instruction (may be empty)lang
- The language for the data (may be empty)prompt
- The prompts to be displayed (may be empty)echo
- For each prompt whether to echo the user's responseString getUpdatedPassword(ClientSession session, String prompt, String lang)
SSH_MSG_USERAUTH_PASSWD_CHANGEREQ
response indicating that the password should be changed - e.g., expired or
not strong enough (as per the server's policy).session
- The ClientSession
through which the request was receivedprompt
- The server's prompt (may be empty)lang
- The prompt's language (may be empty)null
/empty then no updated
password was provided - thus failing the authentication via passwords
(Note: authentication might still succeed via some other means -
be it other passwords, public keys, etc...)Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.