Class StaticPublickeyAuthenticator
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.server.auth.pubkey.StaticPublickeyAuthenticator
-
- All Implemented Interfaces:
PublickeyAuthenticator
- Direct Known Subclasses:
AcceptAllPublickeyAuthenticator,RejectAllPublickeyAuthenticator
public abstract class StaticPublickeyAuthenticator extends AbstractLoggingBean implements PublickeyAuthenticator
Returns the same constant resulttrue/falseregardless
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStaticPublickeyAuthenticator(boolean acceptance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauthenticate(String username, PublicKey key, ServerSession session)Check the validity of a public key.protected voidhandleAcceptance(String username, PublicKey key, ServerSession session)protected voidhandleRejection(String username, PublicKey key, ServerSession session)booleanisAccepted()
-
-
-
Method Detail
-
isAccepted
public final boolean isAccepted()
-
authenticate
public final boolean authenticate(String username, PublicKey key, ServerSession session)
Description copied from interface:PublickeyAuthenticatorCheck the validity of a public key.- Specified by:
authenticatein interfacePublickeyAuthenticator- Parameters:
username- the usernamekey- the keysession- the server session- Returns:
- a boolean indicating if authentication succeeded or not
-
handleAcceptance
protected void handleAcceptance(String username, PublicKey key, ServerSession session)
-
handleRejection
protected void handleRejection(String username, PublicKey key, ServerSession session)
-
-