public class AuthorizedKeyEntriesPublickeyAuthenticator extends AbstractLoggingBean implements PublickeyAuthenticator
Collection
of AuthorizedKeyEntry
s
Records the matched entry under a session attribute.Modifier and Type | Field and Description |
---|---|
static AttributeRepository.AttributeKey<AuthorizedKeyEntry> |
AUTHORIZED_KEY |
private java.lang.Object |
id |
private java.util.Map<AuthorizedKeyEntry,java.security.PublicKey> |
resolvedKeys |
log
Constructor and Description |
---|
AuthorizedKeyEntriesPublickeyAuthenticator(java.lang.Object id,
ServerSession session,
java.util.Collection<? extends AuthorizedKeyEntry> entries,
PublicKeyEntryResolver fallbackResolver) |
Modifier and Type | Method and Description |
---|---|
boolean |
authenticate(java.lang.String username,
java.security.PublicKey key,
ServerSession session)
Check the validity of a public key.
|
java.lang.Object |
getId() |
java.lang.String |
toString() |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fromAuthorizedEntries
public static final AttributeRepository.AttributeKey<AuthorizedKeyEntry> AUTHORIZED_KEY
private java.util.Map<AuthorizedKeyEntry,java.security.PublicKey> resolvedKeys
private java.lang.Object id
public AuthorizedKeyEntriesPublickeyAuthenticator(java.lang.Object id, ServerSession session, java.util.Collection<? extends AuthorizedKeyEntry> entries, PublicKeyEntryResolver fallbackResolver) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
java.security.GeneralSecurityException
public java.lang.Object getId()
toString()
public boolean authenticate(java.lang.String username, java.security.PublicKey key, ServerSession session)
PublickeyAuthenticator
authenticate
in interface PublickeyAuthenticator
username
- the usernamekey
- the keysession
- the server sessionpublic java.lang.String toString()
toString
in class java.lang.Object