org.crsh.auth
Class JaasAuthenticationPlugin

java.lang.Object
  extended by org.crsh.plugin.CRaSHPlugin<AuthenticationPlugin>
      extended by org.crsh.auth.JaasAuthenticationPlugin
All Implemented Interfaces:
AuthenticationPlugin

public class JaasAuthenticationPlugin
extends CRaSHPlugin<AuthenticationPlugin>
implements AuthenticationPlugin

A jaas plugin for authentication purpose

Author:
Nick Scavelli

Field Summary
(package private) static PropertyDescriptor<String> JAAS_DOMAIN
          .
 
Fields inherited from class org.crsh.plugin.CRaSHPlugin
CONSTRUCTED, FAILED, INITIALIZED, INITIALIZING, log
 
Constructor Summary
JaasAuthenticationPlugin()
           
 
Method Summary
 boolean authenticate(String username, String password)
          Returns true if the user is authentified by its username and password.
protected  Iterable<PropertyDescriptor<?>> createConfigurationCapabilities()
          Returns a list of PropertyDescriptor this plugin requires for its configuration.
 AuthenticationPlugin getImplementation()
          Returns the implementation.
 String getName()
          Returns the authentication plugin name.
 
Methods inherited from class org.crsh.plugin.CRaSHPlugin
destroy, getConfigurationCapabilities, getContext, getStatus, getType, init, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JAAS_DOMAIN

static final PropertyDescriptor<String> JAAS_DOMAIN
.

Constructor Detail

JaasAuthenticationPlugin

public JaasAuthenticationPlugin()
Method Detail

getName

public String getName()
Description copied from interface: AuthenticationPlugin
Returns the authentication plugin name.

Specified by:
getName in interface AuthenticationPlugin
Returns:
the plugin name

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<AuthenticationPlugin>
Returns:
the configuration capabilities

authenticate

public boolean authenticate(String username,
                            String password)
                     throws Exception
Description copied from interface: AuthenticationPlugin
Returns true if the user is authentified by its username and password.

Specified by:
authenticate in interface AuthenticationPlugin
Parameters:
username - the username
password - the password
Returns:
true if authentication succeeded
Throws:
Exception - any exception that would prevent authentication to happen

getImplementation

public AuthenticationPlugin getImplementation()
Description copied from class: CRaSHPlugin
Returns the implementation.

Specified by:
getImplementation in class CRaSHPlugin<AuthenticationPlugin>
Returns:
the implementation


Copyright © 2012 eXo Platform SAS. All Rights Reserved.