public class DefaultKeyboardInteractiveAuthenticator extends AbstractLoggingBean implements KeyboardInteractiveAuthenticator
KeyboardInteractiveAuthenticator
where it prompts for the password.Modifier and Type | Field and Description |
---|---|
static DefaultKeyboardInteractiveAuthenticator |
INSTANCE |
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 DefaultKeyboardInteractiveAuthenticator INSTANCE
public DefaultKeyboardInteractiveAuthenticator()
public InteractiveChallenge generateChallenge(ServerSession session, String username, String lang, String subMethods) throws Exception
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 rejectedException
- If unable to generate the challengepublic 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–2024 The Apache Software Foundation. All rights reserved.