org.crsh.plugins.crowd
Class CrowdAuthenticationPlugin
java.lang.Object
org.crsh.plugin.CRaSHPlugin<AuthenticationPlugin>
org.crsh.plugins.crowd.CrowdAuthenticationPlugin
- All Implemented Interfaces:
- AuthenticationPlugin<String>
-
public class CrowdAuthenticationPlugin
- extends CRaSHPlugin<AuthenticationPlugin>
-
- implements AuthenticationPlugin<String>
-
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 |
Method Summary |
boolean |
authenticate(String username, String password)
Returns true if the user is authentified by its username and credential. |
Class<String> |
getCredentialType()
Returns the credential type. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
CrowdAuthenticationPlugin
public CrowdAuthenticationPlugin()
getCrowdClient
private static com.atlassian.crowd.service.client.CrowdClient getCrowdClient()
-
Get a ready to use CrowdClient.
-
-
- Returns:
- a CrowdClient already initialized
getCredentialType
public Class<String> getCredentialType()
- Description copied from interface:
AuthenticationPlugin
-
Returns the credential type.
-
- Specified by:
getCredentialType
in interface AuthenticationPlugin<String>
-
- Returns:
- the credential type
getName
public String getName()
- Description copied from interface:
AuthenticationPlugin
-
Returns the authentication plugin name.
-
- Specified by:
getName
in interface AuthenticationPlugin<String>
-
- 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 credential.
-
- Specified by:
authenticate
in interface AuthenticationPlugin<String>
-
- Parameters:
username
- the username
password
- the credential
- 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 © 2014 eXo Platform SAS. All Rights Reserved.