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 resulttrue/falseregardless
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
-
Constructor Summary
Constructors Constructor Description StaticPasswordAuthenticator(boolean acceptance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)booleanisAccepted()-
Methods 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, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.server.auth.password.PasswordAuthenticator
handleClientPasswordChangeRequest
-
-
-
-
Method Detail
-
isAccepted
public final boolean isAccepted()
-
authenticate
public final boolean authenticate(String username, String password, ServerSession session)
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
protected void handleAcceptance(String username, String password, ServerSession session)
-
handleRejection
protected void handleRejection(String username, String password, ServerSession session)
-
-