|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.fascinator.authentication.ldap.LDAPAuthentication
public class LDAPAuthentication
This plugin is a sample plugin on how to manage authentication against an ldap server.
Standard configuration table:
| Option | Description | Required | Default |
|---|---|---|---|
| ldap/baseURL | URL of the LDAP server | Yes | ldap://ldap.uq.edu.au:389 |
| ldap/baseDN | The base Distinguished Name to search under | Yes | ou=people,o=The University of Queensland,c=AU |
| ldap/idAttribute | The name of the attribute for which the username will be searched under | Yes | uid |
| ldap/ldapRoleAttribute | The name of the LDAP attribute that contains the role values | No | objectClass |
"authentication": {
"type": "ldap",
"ldap": {
"baseURL": "ldap://ldap.uq.edu.au:389",
"baseDN": "ou=people,o=The University of Queensland,c=AU",
"idAttribute": "uid"
"ldapRoleAttribute": "objectClass",
}
}
None
| Constructor Summary | |
|---|---|
LDAPAuthentication()
|
|
| Method Summary | |
|---|---|
void |
changePassword(String username,
String password)
A simplified method alternative to modifyUser() if the implementing class wants to just allow password changes. |
com.googlecode.fascinator.api.authentication.User |
createUser(String username,
String password)
Create a user. |
void |
deleteUser(String username)
Delete a user. |
String |
describeUser()
Describe the metadata the implementing class needs/allows for a user. |
String |
getId()
|
String |
getName()
|
com.googlecode.fascinator.api.PluginDescription |
getPluginDetails()
Gets a PluginDescription object relating to this plugin. |
com.googlecode.fascinator.api.authentication.User |
getUser(String username)
Returns a User object if the implementing class supports user queries without authentication. |
void |
init(File jsonFile)
|
void |
init(String jsonString)
Initialisation of LDAP Authentication plugin |
com.googlecode.fascinator.api.authentication.User |
logIn(String username,
String password)
Tests the user's username/password validity. |
void |
logOut(com.googlecode.fascinator.api.authentication.User user)
Optional logout method if the implementing class wants to do any post-processing. |
com.googlecode.fascinator.api.authentication.User |
modifyUser(String username,
String property,
boolean newValue)
|
com.googlecode.fascinator.api.authentication.User |
modifyUser(String username,
String property,
int newValue)
|
com.googlecode.fascinator.api.authentication.User |
modifyUser(String username,
String property,
String newValue)
Modify one of the user's properties. |
List<com.googlecode.fascinator.api.authentication.User> |
searchUsers(String search)
Returns a list of users matching the search. |
void |
shutdown()
|
boolean |
supportsUserManagement()
Method for testing if the implementing plugin allows the creation, deletion and modification of users. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LDAPAuthentication()
| Method Detail |
|---|
public String getId()
getId in interface com.googlecode.fascinator.api.Pluginpublic String getName()
getName in interface com.googlecode.fascinator.api.Pluginpublic com.googlecode.fascinator.api.PluginDescription getPluginDetails()
getPluginDetails in interface com.googlecode.fascinator.api.Plugin
public void init(String jsonString)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
init in interface com.googlecode.fascinator.api.Plugincom.googlecode.fascinator.api.authentication.AuthenticationException - if fails to initialise
public void init(File jsonFile)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
init in interface com.googlecode.fascinator.api.Plugincom.googlecode.fascinator.api.authentication.AuthenticationException
public void shutdown()
throws com.googlecode.fascinator.api.authentication.AuthenticationException
shutdown in interface com.googlecode.fascinator.api.Plugincom.googlecode.fascinator.api.authentication.AuthenticationException
public com.googlecode.fascinator.api.authentication.User logIn(String username,
String password)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
logIn in interface com.googlecode.fascinator.api.authentication.Authenticationusername - The username of the user logging in.password - The password of the user logging in.
com.googlecode.fascinator.api.authentication.AuthenticationException - if there was an error logging in.
public void logOut(com.googlecode.fascinator.api.authentication.User user)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
logOut in interface com.googlecode.fascinator.api.authentication.Authenticationusername - The username of the logging out user.
com.googlecode.fascinator.api.authentication.AuthenticationException - if there was an error logging out.public boolean supportsUserManagement()
supportsUserManagement in interface com.googlecode.fascinator.api.authentication.Authenticationpublic String describeUser()
describeUser in interface com.googlecode.fascinator.api.authentication.Authentication
public com.googlecode.fascinator.api.authentication.User createUser(String username,
String password)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
createUser in interface com.googlecode.fascinator.api.authentication.Authenticationusername - The username of the new user.password - The password of the new user.
com.googlecode.fascinator.api.authentication.AuthenticationException - if there was an error creating the user.
public void deleteUser(String username)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
deleteUser in interface com.googlecode.fascinator.api.authentication.Authenticationusername - The username of the user to delete.
com.googlecode.fascinator.api.authentication.AuthenticationException - if there was an error during deletion.
public void changePassword(String username,
String password)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
changePassword in interface com.googlecode.fascinator.api.authentication.Authenticationusername - The user changing their password.password - The new password for the user.
com.googlecode.fascinator.api.authentication.AuthenticationException - if there was an error changing the password.
public com.googlecode.fascinator.api.authentication.User modifyUser(String username,
String property,
String newValue)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
modifyUser in interface com.googlecode.fascinator.api.authentication.Authenticationusername - The user being modified.property - The user property being modified.newValue - The new value to be assigned to the property.
com.googlecode.fascinator.api.authentication.AuthenticationException - if there was an error during modification.
public com.googlecode.fascinator.api.authentication.User modifyUser(String username,
String property,
int newValue)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
modifyUser in interface com.googlecode.fascinator.api.authentication.Authenticationcom.googlecode.fascinator.api.authentication.AuthenticationException
public com.googlecode.fascinator.api.authentication.User modifyUser(String username,
String property,
boolean newValue)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
modifyUser in interface com.googlecode.fascinator.api.authentication.Authenticationcom.googlecode.fascinator.api.authentication.AuthenticationException
public com.googlecode.fascinator.api.authentication.User getUser(String username)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
getUser in interface com.googlecode.fascinator.api.authentication.Authenticationusername - The username of the user required.
com.googlecode.fascinator.api.authentication.AuthenticationException - if there was an error retrieving the object.
public List<com.googlecode.fascinator.api.authentication.User> searchUsers(String search)
throws com.googlecode.fascinator.api.authentication.AuthenticationException
searchUsers in interface com.googlecode.fascinator.api.authentication.Authenticationsearch - The search string to execute.
com.googlecode.fascinator.api.authentication.AuthenticationException - if there was an error searching.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||