org.crsh.auth
Interface AuthenticationPlugin<C>

Type Parameters:
C - the credential parameter type
All Known Implementing Classes:
JaasAuthenticationPlugin, KeyAuthenticationPlugin, SimpleAuthenticationPlugin

public interface AuthenticationPlugin<C>

The authentication plugin.


Field Summary
static PropertyDescriptor<List> AUTH
          The authentication plugin to use.
static AuthenticationPlugin<Object> NULL
          The plugin that never authenticates, returns the name value null.
 
Method Summary
 boolean authenticate(String username, C credential)
          Returns true if the user is authentified by its username and credential.
 Class<C> getCredentialType()
          Returns the credential type.
 String getName()
          Returns the authentication plugin name.
 

Field Detail

AUTH

static final PropertyDescriptor<List> AUTH
The authentication plugin to use.


NULL

static final AuthenticationPlugin<Object> NULL
The plugin that never authenticates, returns the name value null.

Method Detail

getName

String getName()
Returns the authentication plugin name.

Returns:
the plugin name

getCredentialType

Class<C> getCredentialType()
Returns the credential type.

Returns:
the credential type

authenticate

boolean authenticate(String username,
                     C credential)
                     throws Exception
Returns true if the user is authentified by its username and credential.

Parameters:
username - the username
credential - the credential
Returns:
true if authentication succeeded
Throws:
Exception - any exception that would prevent authentication to happen


Copyright © 2015 eXo Platform SAS. All Rights Reserved.