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
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
authenticate
(String username, String password, ServerSession session) Check the validity of a password.protected void
handleAcceptance
(String username, String password, ServerSession session) protected void
handleRejection
(String username, String password, ServerSession session) final boolean
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
-
Constructor Details
-
StaticPasswordAuthenticator
public StaticPasswordAuthenticator(boolean acceptance)
-
-
Method Details
-
isAccepted
public final boolean isAccepted() -
authenticate
Description copied from interface:PasswordAuthenticator
Check the validity of a password.- Specified by:
authenticate
in interfacePasswordAuthenticator
- Parameters:
username
- The username credentialpassword
- The provided passwordsession
- TheServerSession
attempting the authentication- Returns:
true
indicating if authentication succeeded
-
handleAcceptance
-
handleRejection
-