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/false
regardless
-
-
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 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)
boolean
isAccepted()
-
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: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
protected void handleAcceptance(String username, String password, ServerSession session)
-
handleRejection
protected void handleRejection(String username, String password, ServerSession session)
-
-