Class AuthorizedKeyEntriesPublickeyAuthenticator
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.server.auth.pubkey.AuthorizedKeyEntriesPublickeyAuthenticator
- All Implemented Interfaces:
PublickeyAuthenticator
public class AuthorizedKeyEntriesPublickeyAuthenticator
extends AbstractLoggingBean
implements PublickeyAuthenticator
Checks against a
Collection
of AuthorizedKeyEntry
s
Records the matched entry under a session attribute.-
Field Summary
Modifier and TypeFieldDescriptionstatic final AttributeRepository.AttributeKey<AuthorizedKeyEntry>
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
ConstructorDescriptionAuthorizedKeyEntriesPublickeyAuthenticator
(Object id, ServerSession session, Collection<? extends AuthorizedKeyEntry> entries, PublicKeyEntryResolver fallbackResolver) -
Method Summary
Modifier and TypeMethodDescriptionboolean
authenticate
(String username, PublicKey key, ServerSession session) Check the validity of a public key.getId()
toString()
-
Field Details
-
AUTHORIZED_KEY
-
-
Constructor Details
-
AuthorizedKeyEntriesPublickeyAuthenticator
public AuthorizedKeyEntriesPublickeyAuthenticator(Object id, ServerSession session, Collection<? extends AuthorizedKeyEntry> entries, PublicKeyEntryResolver fallbackResolver) throws IOException, GeneralSecurityException - Throws:
IOException
GeneralSecurityException
-
-
Method Details
-
getId
- Returns:
- Some kind of mnemonic identifier for the authenticator - used also in
toString()
-
authenticate
Description copied from interface:PublickeyAuthenticator
Check the validity of a public key.- Specified by:
authenticate
in interfacePublickeyAuthenticator
- Parameters:
username
- the usernamekey
- the keysession
- the server session- Returns:
- a boolean indicating if authentication succeeded or not
-
toString
-