Top Description Fields Constructors Methods
org.apache.sshd.server.auth.pubkey

public abstract Class StaticPublickeyAuthenticator

extends AbstractLoggingBean
implements PublickeyAuthenticator
Class Inheritance
All Implemented Interfaces
org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator
Known Direct Subclasses
org.apache.sshd.server.auth.pubkey.AcceptAllPublickeyAuthenticator, org.apache.sshd.server.auth.pubkey.RejectAllPublickeyAuthenticator
Imports
java.security.PublicKey, org.apache.sshd.common.config.keys.KeyUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean, org.apache.sshd.server.session.ServerSession

Returns the same constant result true/false regardless

Field Summary

Modifier and TypeField and Description
private final boolean
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
protected
StaticPublickeyAuthenticator(boolean acceptance)

Method Summary

Modifier and TypeMethod and Description
public final boolean
authenticate(String
the username
username
,
PublicKey
the key
key
,
ServerSession
the server session
session
)

Implements org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator.authenticate.

Check the validity of a public key.

protected void
protected void
public final boolean
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

acceptanceback to summary
private final boolean acceptance

Constructor Detail

StaticPublickeyAuthenticatorback to summary
protected StaticPublickeyAuthenticator(boolean acceptance)

Method Detail

authenticateback to summary
public final boolean authenticate(String username, PublicKey key, ServerSession session)

Implements org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator.authenticate.

Doc from org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator.authenticate.

Check the validity of a public key.

Parameters
username:String

the username

key:PublicKey

the key

session:ServerSession

the server session

Returns:boolean

a boolean indicating if authentication succeeded or not

Annotations
@Override
handleAcceptanceback to summary
protected void handleAcceptance(String username, PublicKey key, ServerSession session)
handleRejectionback to summary
protected void handleRejection(String username, PublicKey key, ServerSession session)
isAcceptedback to summary
public final boolean isAccepted()