Interface KeyboardInteractiveAuthenticator

All Known Implementing Classes:
DefaultKeyboardInteractiveAuthenticator

public interface KeyboardInteractiveAuthenticator
Provides pluggable authentication using the "keyboard-interactive" method as specified by RFC-4256?
  • Field Details

  • Method Details

    • generateChallenge

      InteractiveChallenge generateChallenge(ServerSession session, String username, String lang, String subMethods) throws Exception
      Generates the interactive "challenge" to send to the client
      Parameters:
      session - The ServerSession through which the request was received
      username - The username
      lang - The language tag
      subMethods - Sub-methods hints sent by the client
      Returns:
      The InteractiveChallenge - if null then authentication attempt via "keyboard-interactive" method is rejected
      Throws:
      Exception - If unable to generate the challenge
    • authenticate

      boolean authenticate(ServerSession session, String username, List<String> responses) throws Exception
      Called to authenticate the response to the challenge(s) sent previously
      Parameters:
      session - The ServerSession through which the response was received
      username - The username
      responses - 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:
      true if responses have been validated
      Throws:
      Exception - if bad responses and server should terminate the connection