org.crsh.auth
Class KeyAuthenticationPlugin
java.lang.Object
org.crsh.plugin.CRaSHPlugin<KeyAuthenticationPlugin>
org.crsh.auth.KeyAuthenticationPlugin
- All Implemented Interfaces:
- AuthenticationPlugin<PublicKey>
-
public class KeyAuthenticationPlugin
- extends CRaSHPlugin<KeyAuthenticationPlugin>
-
- implements AuthenticationPlugin<PublicKey>
-
- Author:
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TYPES
private static final String[] TYPES
-
.
AUTHORIZED_KEY_PATH
public static final PropertyDescriptor<String> AUTHORIZED_KEY_PATH
-
The SSH authorized key path.
authorizedKeys
private Set<PublicKey> authorizedKeys
-
.
KeyAuthenticationPlugin
public KeyAuthenticationPlugin()
createConfigurationCapabilities
protected Iterable<PropertyDescriptor<?>> createConfigurationCapabilities()
- Description copied from class:
CRaSHPlugin
-
Returns a list of
PropertyDescriptor
this plugin requires for its configuration.
-
- Overrides:
createConfigurationCapabilities
in class CRaSHPlugin<KeyAuthenticationPlugin>
-
- Returns:
- the configuration capabilities
getName
public String getName()
- Description copied from interface:
AuthenticationPlugin
-
Returns the authentication plugin name.
-
- Specified by:
getName
in interface AuthenticationPlugin<PublicKey>
-
- Returns:
- the plugin name
getImplementation
public KeyAuthenticationPlugin getImplementation()
- Description copied from class:
CRaSHPlugin
-
Returns the implementation.
-
- Specified by:
getImplementation
in class CRaSHPlugin<KeyAuthenticationPlugin>
-
- Returns:
- the implementation
getCredentialType
public Class<PublicKey> getCredentialType()
- Description copied from interface:
AuthenticationPlugin
-
Returns the credential type.
-
- Specified by:
getCredentialType
in interface AuthenticationPlugin<PublicKey>
-
- Returns:
- the credential type
init
public void init()
- Description copied from class:
CRaSHPlugin
-
Implement this method to know about init life cycle callback.
-
- Overrides:
init
in class CRaSHPlugin<KeyAuthenticationPlugin>
-
authenticate
public boolean authenticate(String username,
PublicKey credential)
throws Exception
- Description copied from interface:
AuthenticationPlugin
-
Returns true if the user is authentified by its username and credential.
-
- Specified by:
authenticate
in interface AuthenticationPlugin<PublicKey>
-
- Parameters:
username
- the username
credential
- the credential
- Returns:
- true if authentication succeeded
- Throws:
Exception
- any exception that would prevent authentication to happen
Copyright © 2014 eXo Platform SAS. All Rights Reserved.