Class StaticPasswordAuthenticator

java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.server.auth.password.StaticPasswordAuthenticator
All Implemented Interfaces:
PasswordAuthenticator
Direct Known Subclasses:
AcceptAllPasswordAuthenticator, RejectAllPasswordAuthenticator

public class StaticPasswordAuthenticator extends AbstractLoggingBean implements PasswordAuthenticator
Returns the same constant result true/false regardless
  • Constructor Details

    • StaticPasswordAuthenticator

      public StaticPasswordAuthenticator(boolean acceptance)
  • Method Details

    • isAccepted

      public final boolean isAccepted()
    • authenticate

      public final boolean authenticate(String username, String password, ServerSession session)
      Description copied from interface: PasswordAuthenticator
      Check the validity of a password.
      Specified by:
      authenticate in interface PasswordAuthenticator
      Parameters:
      username - The username credential
      password - The provided password
      session - The ServerSession attempting the authentication
      Returns:
      true indicating if authentication succeeded
    • handleAcceptance

      protected void handleAcceptance(String username, String password, ServerSession session)
    • handleRejection

      protected void handleRejection(String username, String password, ServerSession session)