public class DefaultKeyboardInteractiveAuthenticator extends AbstractLoggingBean implements KeyboardInteractiveAuthenticator
KeyboardInteractiveAuthenticator
where it prompts for the password.Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_KB_INTERACTIVE_ECHO_PROMPT |
static String |
DEFAULT_KB_INTERACTIVE_INSTRUCTION |
static String |
DEFAULT_KB_INTERACTIVE_LANG |
static String |
DEFAULT_KB_INTERACTIVE_NAME |
static String |
DEFAULT_KB_INTERACTIVE_PROMPT |
static DefaultKeyboardInteractiveAuthenticator |
INSTANCE |
static String |
KB_INTERACTIVE_ECHO_PROMPT_PROP |
static String |
KB_INTERACTIVE_INSTRUCTION_PROP |
static String |
KB_INTERACTIVE_LANG_PROP |
static String |
KB_INTERACTIVE_NAME_PROP |
static String |
KB_INTERACTIVE_PROMPT_PROP |
log
NONE
Constructor and Description |
---|
DefaultKeyboardInteractiveAuthenticator() |
Modifier and Type | Method and Description |
---|---|
boolean |
authenticate(ServerSession session,
String username,
List<String> responses)
Called to authenticate the response to the challenge(s) sent previously
|
InteractiveChallenge |
generateChallenge(ServerSession session,
String username,
String lang,
String subMethods)
Generates the interactive "challenge" to send to the client
|
protected String |
getInteractionInstruction(ServerSession session) |
protected String |
getInteractionLanguage(ServerSession session) |
protected String |
getInteractionName(ServerSession session) |
protected String |
getInteractionPrompt(ServerSession session) |
protected boolean |
isInteractionPromptEchoEnabled(ServerSession session) |
public static final String KB_INTERACTIVE_NAME_PROP
public static final String DEFAULT_KB_INTERACTIVE_NAME
public static final String KB_INTERACTIVE_INSTRUCTION_PROP
public static final String DEFAULT_KB_INTERACTIVE_INSTRUCTION
public static final String KB_INTERACTIVE_LANG_PROP
public static final String DEFAULT_KB_INTERACTIVE_LANG
public static final String KB_INTERACTIVE_PROMPT_PROP
public static final String DEFAULT_KB_INTERACTIVE_PROMPT
public static final String KB_INTERACTIVE_ECHO_PROMPT_PROP
public static final boolean DEFAULT_KB_INTERACTIVE_ECHO_PROMPT
public static final DefaultKeyboardInteractiveAuthenticator INSTANCE
public DefaultKeyboardInteractiveAuthenticator()
public InteractiveChallenge generateChallenge(ServerSession session, String username, String lang, String subMethods)
KeyboardInteractiveAuthenticator
generateChallenge
in interface KeyboardInteractiveAuthenticator
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 rejectedpublic boolean authenticate(ServerSession session, String username, List<String> responses) throws Exception
KeyboardInteractiveAuthenticator
authenticate
in interface KeyboardInteractiveAuthenticator
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 validatedException
- if bad responses and server should terminate the connectionprotected String getInteractionName(ServerSession session)
protected String getInteractionInstruction(ServerSession session)
protected String getInteractionLanguage(ServerSession session)
protected String getInteractionPrompt(ServerSession session)
protected boolean isInteractionPromptEchoEnabled(ServerSession session)
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.