|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maverick.sshd.AuthorizedKeysStoreImpl
public class AuthorizedKeysStoreImpl
This class implements the OpenSSH style authorized_keys public key store.
| Field Summary | |
|---|---|
protected String |
authorizedKeysFile
The path relative to the users root directory from which to load authorized keys |
| Constructor Summary | |
|---|---|
AuthorizedKeysStoreImpl()
Create a default authorized_keys store that reads keys from .ssh/authorized_keys. |
|
AuthorizedKeysStoreImpl(String authorizedKeysFile)
Create an authorized keys stores that reads keys from a custom location. |
|
| Method Summary | |
|---|---|
void |
add(SessionChannel session,
String algorithm,
String comment,
byte[] encodedKey)
Store the supplied key in the key store if possible. |
Iterator |
getKeys(SessionChannel session)
Get an iterator of all stored public keys. |
boolean |
isAuthorizedKey(com.maverick.ssh.components.SshPublicKey key,
Connection con,
AuthenticationProvider authenticationProvider)
Checks the given public key by comparing it against the public keys stored in the users authorized_keys file. |
void |
remove(SessionChannel session,
String algorithm,
byte[] encodedKey)
Remove the supplied key from the key store if possible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String authorizedKeysFile
| Constructor Detail |
|---|
public AuthorizedKeysStoreImpl()
public AuthorizedKeysStoreImpl(String authorizedKeysFile)
authorizedKeysFile - String| Method Detail |
|---|
public boolean isAuthorizedKey(com.maverick.ssh.components.SshPublicKey key,
Connection con,
AuthenticationProvider authenticationProvider)
isAuthorizedKey in interface PublicKeyStorekey - SshPublicKeysessionid - byte[]authenticationProvider - AuthenticationProvider
public void add(SessionChannel session,
String algorithm,
String comment,
byte[] encodedKey)
PublicKeyStore
add in interface PublicKeyStoresession - sessionalgorithm - algorithmcomment - commentencodedKey - encoded key
public void remove(SessionChannel session,
String algorithm,
byte[] encodedKey)
PublicKeyStore
remove in interface PublicKeyStoresession - sessionalgorithm - algorithmencodedKey - encoded keypublic Iterator getKeys(SessionChannel session)
PublicKeyStore
getKeys in interface PublicKeyStoresession - session
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||