org.crsh.plugins.crowd
Class CrowdAuthenticationPlugin

java.lang.Object
  extended by org.crsh.plugin.CRaSHPlugin<AuthenticationPlugin>
      extended by org.crsh.plugins.crowd.CrowdAuthenticationPlugin
All Implemented Interfaces:
AuthenticationPlugin

public class CrowdAuthenticationPlugin
extends CRaSHPlugin<AuthenticationPlugin>
implements AuthenticationPlugin

Allows to use an Atlassian Crowd serer to authenticate on CRaSH To use it you need to :


Field Summary
private static com.atlassian.crowd.service.client.CrowdClient crowdClient
          Crowd client instance
private static Object lock
          Lock to create the crowd client
protected  Logger log
          Logger
 
Fields inherited from class org.crsh.plugin.CRaSHPlugin
CONSTRUCTED, FAILED, INITIALIZED, INITIALIZING
 
Constructor Summary
CrowdAuthenticationPlugin()
           
 
Method Summary
 boolean authenticate(String username, String password)
          Returns true if the user is authentified by its username and password.
private static com.atlassian.crowd.service.client.CrowdClient getCrowdClient()
          Get a ready to use CrowdClient.
 AuthenticationPlugin getImplementation()
          Returns the implementation.
 String getName()
          Returns the authentication plugin name.
 
Methods inherited from class org.crsh.plugin.CRaSHPlugin
createConfigurationCapabilities, 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

log

protected final Logger log
Logger


crowdClient

private static volatile com.atlassian.crowd.service.client.CrowdClient crowdClient
Crowd client instance


lock

private static final Object lock
Lock to create the crowd client

Constructor Detail

CrowdAuthenticationPlugin

public CrowdAuthenticationPlugin()
Method Detail

getCrowdClient

private static com.atlassian.crowd.service.client.CrowdClient getCrowdClient()
Get a ready to use CrowdClient.

Returns:
a CrowdClient already initialized

getName

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

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

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 © 2013 eXo Platform SAS. All Rights Reserved.