public interface KeyboardInteractiveAuthenticator
Modifier and Type | Field and Description |
---|---|
static KeyboardInteractiveAuthenticator |
NONE
An authenticator that rejects any attempt to use it
|
Modifier and Type | Method and Description |
---|---|
boolean |
authenticate(ServerSession session,
java.lang.String username,
java.util.List<java.lang.String> responses)
Called to authenticate the response to the challenge(s) sent previously
|
InteractiveChallenge |
generateChallenge(ServerSession session,
java.lang.String username,
java.lang.String lang,
java.lang.String subMethods)
Generates the interactive "challenge" to send to the client
|
static final KeyboardInteractiveAuthenticator NONE
InteractiveChallenge generateChallenge(ServerSession session, java.lang.String username, java.lang.String lang, java.lang.String subMethods) throws java.lang.Exception
session
- The ServerSession
through which the request was receivedusername
- The usernamelang
- The language tagsubMethods
- Sub-methods hints sent by the clientInteractiveChallenge
- if null
then authentication attempt via
"keyboard-interactive" method is rejectedjava.lang.Exception
- If unable to generate the challengeboolean authenticate(ServerSession session, java.lang.String username, java.util.List<java.lang.String> responses) throws java.lang.Exception
session
- The ServerSession
through which the response was receivedusername
- The usernameresponses
- The received responses - Note: it is up to the authenticator to make sure that the
number of responses matches the number of prompts sent in the initial challenge. The
order of the responses matches the order of the prompts sent to the clienttrue
if responses have been validatedjava.lang.Exception
- if bad responses and server should terminate the connection