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-
Field Summary
FieldsFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanauthenticate(String username, String password, ServerSession session) Check the validity of a password.protected voidhandleAcceptance(String username, String password, ServerSession session) protected voidhandleRejection(String username, String password, ServerSession session) final booleanMethods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sshd.server.auth.password.PasswordAuthenticator
handleClientPasswordChangeRequest
-
Field Details
-
acceptance
private final boolean acceptance
-
-
Constructor Details
-
StaticPasswordAuthenticator
public StaticPasswordAuthenticator(boolean acceptance)
-
-
Method Details
-
isAccepted
public final boolean isAccepted() -
authenticate
Description copied from interface:PasswordAuthenticatorCheck the validity of a password.- Specified by:
authenticatein interfacePasswordAuthenticator- Parameters:
username- The username credentialpassword- The provided passwordsession- TheServerSessionattempting the authentication- Returns:
trueindicating if authentication succeeded
-
handleAcceptance
-
handleRejection
-