Top Description Fields Methods
org.apache.sshd.server.auth.keyboard

public Interface KeyboardInteractiveAuthenticator

Known Direct Implementers
org.apache.sshd.server.auth.keyboard.DefaultKeyboardInteractiveAuthenticator
Imports
java.util.List, org.apache.sshd.server.session.ServerSession

Provides pluggable authentication using the "keyboard-interactive" method as specified by RFC-4256?
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final KeyboardInteractiveAuthenticator
NONE

An authenticator that rejects any attempt to use it

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if responses have been validated
authenticate
(ServerSession
The ServerSession through which the response was received
session
,
String
The username
username
,
List<String>
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 client
responses
)

Called to authenticate the response to the challenge(s) sent previously

public InteractiveChallenge

Returns:

The InteractiveChallenge - if null then authentication attempt via "keyboard-interactive" method is rejected
generateChallenge
(ServerSession
The ServerSession through which the request was received
session
,
String
The username
username
,
String
The language tag
lang
,
String
Sub-methods hints sent by the client
subMethods
)

Generates the interactive "challenge" to send to the client

Field Detail

NONEback to summary
public static final KeyboardInteractiveAuthenticator NONE

An authenticator that rejects any attempt to use it

Method Detail

authenticateback to summary
public boolean authenticate(ServerSession session, String username, List<String> responses) throws Exception

Called to authenticate the response to the challenge(s) sent previously

Parameters
session:ServerSession

The ServerSession through which the response was received

username:String

The username

responses:List<String>

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 client

Returns:boolean

true if responses have been validated

Exceptions
Exception:
if bad responses and server should terminate the connection
generateChallengeback to summary
public InteractiveChallenge generateChallenge(ServerSession session, String username, String lang, String subMethods) throws Exception

Generates the interactive "challenge" to send to the client

Parameters
session:ServerSession

The ServerSession through which the request was received

username:String

The username

lang:String

The language tag

subMethods:String

Sub-methods hints sent by the client

Returns:InteractiveChallenge

The InteractiveChallenge - if null then authentication attempt via "keyboard-interactive" method is rejected

Exceptions
Exception:
If unable to generate the challenge