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

public Class AuthorizedKeyEntriesPublickeyAuthenticator

extends AbstractLoggingBean
implements PublickeyAuthenticator
Class Inheritance
All Implemented Interfaces
org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator
Imports
java.io.IOException, java.security.GeneralSecurityException, .PublicKey, java.util.Collection, .Collections, .HashMap, .Map, .Objects, org.apache.sshd.common.AttributeRepository, org.apache.sshd.common.config.keys.AuthorizedKeyEntry, .KeyUtils, .PublicKeyEntryResolver, org.apache.sshd.common.util.GenericUtils, .MapEntryUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean, org.apache.sshd.server.session.ServerSession

Checks against a Collection of AuthorizedKeyEntrys Records the matched entry under a session attribute.

Field Summary

Modifier and TypeField and Description
public static final AttributeRepository.AttributeKey<AuthorizedKeyEntry>
private Object
private Map<AuthorizedKeyEntry, PublicKey>
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public 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.

public Object

Returns:

Some kind of mnemonic identifier for the authenticator - used also in toString()
getId
()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

AUTHORIZED_KEYback to summary
public static final AttributeRepository.AttributeKey<AuthorizedKeyEntry> AUTHORIZED_KEY
idback to summary
private Object id
resolvedKeysback to summary
private Map<AuthorizedKeyEntry, PublicKey> resolvedKeys

Constructor Detail

AuthorizedKeyEntriesPublickeyAuthenticatorback to summary
public AuthorizedKeyEntriesPublickeyAuthenticator(Object id, ServerSession session, Collection<? extends AuthorizedKeyEntry> entries, PublicKeyEntryResolver fallbackResolver) throws IOException, GeneralSecurityException

Method Detail

authenticateback to summary
public 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
getIdback to summary
public Object getId()
Returns:Object

Some kind of mnemonic identifier for the authenticator - used also in toString()

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override