Interface UserAuth

All Superinterfaces:
org.apache.sshd.common.NamedResource, ServerSessionHolder, org.apache.sshd.common.auth.UserAuthInstance<ServerSession>, org.apache.sshd.common.auth.UsernameHolder
All Known Implementing Classes:
AbstractUserAuth, UserAuthGSS, UserAuthHostBased, UserAuthKeyboardInteractive, UserAuthNone, UserAuthPassword, UserAuthPublicKey

public interface UserAuth extends ServerSessionHolder, org.apache.sshd.common.auth.UserAuthInstance<ServerSession>, org.apache.sshd.common.auth.UsernameHolder
Server side authentication mechanism.
Author:
Apache MINA SSHD Project
  • Field Summary

    Fields inherited from interface org.apache.sshd.common.NamedResource

    BY_NAME_COMPARATOR, NAME_EXTRACTOR
  • Method Summary

    Modifier and Type
    Method
    Description
    auth(ServerSession session, String username, String service, org.apache.sshd.common.util.buffer.Buffer buffer)
    Try to authenticate the user.
    void
    Free any system resources used by the module.
    next(org.apache.sshd.common.util.buffer.Buffer buffer)
    Handle another step in the authentication process.

    Methods inherited from interface org.apache.sshd.common.NamedResource

    getName

    Methods inherited from interface ServerSessionHolder

    getServerSession

    Methods inherited from interface org.apache.sshd.common.auth.UserAuthInstance

    getSession

    Methods inherited from interface org.apache.sshd.common.auth.UsernameHolder

    getUsername
  • Method Details

    • auth

      Boolean auth(ServerSession session, String username, String service, org.apache.sshd.common.util.buffer.Buffer buffer) throws AsyncAuthException, Exception
      Try to authenticate the user. This methods should return a non null value indicating if the authentication succeeded. If the authentication is still ongoing, a null value should be returned.
      Parameters:
      session - the current ServerSession session
      username - the user trying to log in
      service - the requested service name
      buffer - the request buffer containing parameters specific to this request
      Returns:
      true if the authentication succeeded, false if the authentication failed and null if not finished yet
      Throws:
      AsyncAuthException - if the service is willing to perform an asynchronous authentication
      Exception - if the authentication fails
    • next

      Boolean next(org.apache.sshd.common.util.buffer.Buffer buffer) throws AsyncAuthException, Exception
      Handle another step in the authentication process.
      Parameters:
      buffer - the request buffer containing parameters specific to this request
      Returns:
      true if the authentication succeeded, false if the authentication failed and null if not finished yet
      Throws:
      AsyncAuthException - if the service is willing to perform an asynchronous authentication
      Exception - if the authentication fails
    • destroy

      void destroy()
      Free any system resources used by the module.