public class KeyAuthenticationPlugin extends CRaSHPlugin<KeyAuthenticationPlugin> implements AuthenticationPlugin<PublicKey>
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptor<String> |
AUTHORIZED_KEY_PATH
The SSH authorized key path.
|
private Set<PublicKey> |
authorizedKeys
.
|
private static String[] |
TYPES
.
|
CONSTRUCTED, FAILED, INITIALIZED, INITIALIZING, log
AUTH, NULL
Constructor and Description |
---|
KeyAuthenticationPlugin() |
Modifier and Type | Method and Description |
---|---|
boolean |
authenticate(String username,
PublicKey credential)
Returns true if the user is authentified by its username and credential.
|
protected Iterable<PropertyDescriptor<?>> |
createConfigurationCapabilities()
Returns a list of
PropertyDescriptor this plugin requires for its configuration. |
Class<PublicKey> |
getCredentialType()
Returns the credential type.
|
KeyAuthenticationPlugin |
getImplementation()
Returns the implementation.
|
String |
getName()
Returns the authentication plugin name.
|
void |
init()
Implement this method to know about init life cycle callback.
|
destroy, getConfigurationCapabilities, getContext, getStatus, getType, toString
public static final PropertyDescriptor<String> AUTHORIZED_KEY_PATH
private Set<PublicKey> authorizedKeys
public KeyAuthenticationPlugin()
protected Iterable<PropertyDescriptor<?>> createConfigurationCapabilities()
CRaSHPlugin
PropertyDescriptor
this plugin requires for its configuration.createConfigurationCapabilities
in class CRaSHPlugin<KeyAuthenticationPlugin>
public String getName()
AuthenticationPlugin
getName
in interface AuthenticationPlugin<PublicKey>
public KeyAuthenticationPlugin getImplementation()
CRaSHPlugin
getImplementation
in class CRaSHPlugin<KeyAuthenticationPlugin>
public Class<PublicKey> getCredentialType()
AuthenticationPlugin
getCredentialType
in interface AuthenticationPlugin<PublicKey>
public void init()
CRaSHPlugin
init
in class CRaSHPlugin<KeyAuthenticationPlugin>
public boolean authenticate(String username, PublicKey credential) throws Exception
AuthenticationPlugin
authenticate
in interface AuthenticationPlugin<PublicKey>
username
- the usernamecredential
- the credentialException
- any exception that would prevent authentication to happenCopyright © 2015 eXo Platform SAS. All Rights Reserved.