|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.plugin.CRaSHPlugin<AuthenticationPlugin> org.crsh.auth.SimpleAuthenticationPlugin
public class SimpleAuthenticationPlugin
Field Summary | |
---|---|
private String |
password
. |
static PropertyDescriptor<String> |
SIMPLE_PASSWORD
The password. |
static PropertyDescriptor<String> |
SIMPLE_USERNAME
The username. |
private String |
username
. |
Fields inherited from class org.crsh.plugin.CRaSHPlugin |
---|
CONSTRUCTED, FAILED, INITIALIZED, INITIALIZING, log |
Fields inherited from interface org.crsh.auth.AuthenticationPlugin |
---|
AUTH, NULL |
Constructor Summary | |
---|---|
SimpleAuthenticationPlugin()
|
Method Summary | |
---|---|
boolean |
authenticate(String username,
String password)
Returns true if the user is authentified by its username and credential. |
protected Iterable<PropertyDescriptor<?>> |
createConfigurationCapabilities()
Returns a list of PropertyDescriptor this plugin requires for its configuration. |
Class<String> |
getCredentialType()
Returns the credential type. |
AuthenticationPlugin |
getImplementation()
Returns the implementation. |
String |
getName()
Returns the authentication plugin name. |
void |
init()
Implement this method to know about init life cycle callback. |
Methods inherited from class org.crsh.plugin.CRaSHPlugin |
---|
destroy, getConfigurationCapabilities, getContext, getStatus, getType, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PropertyDescriptor<String> SIMPLE_USERNAME
public static final PropertyDescriptor<String> SIMPLE_PASSWORD
private String username
private String password
Constructor Detail |
---|
public SimpleAuthenticationPlugin()
Method Detail |
---|
protected Iterable<PropertyDescriptor<?>> createConfigurationCapabilities()
CRaSHPlugin
PropertyDescriptor
this plugin requires for its configuration.
createConfigurationCapabilities
in class CRaSHPlugin<AuthenticationPlugin>
public Class<String> getCredentialType()
AuthenticationPlugin
getCredentialType
in interface AuthenticationPlugin<String>
public AuthenticationPlugin getImplementation()
CRaSHPlugin
getImplementation
in class CRaSHPlugin<AuthenticationPlugin>
public void init()
CRaSHPlugin
init
in class CRaSHPlugin<AuthenticationPlugin>
public String getName()
AuthenticationPlugin
getName
in interface AuthenticationPlugin<String>
public boolean authenticate(String username, String password) throws Exception
AuthenticationPlugin
authenticate
in interface AuthenticationPlugin<String>
username
- the usernamepassword
- the credential
Exception
- any exception that would prevent authentication to happen
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |