|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.fascinator.roles.ldap.LDAPRoles
public class LDAPRoles
This plugin implements ldap roles.
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/filterPrefix | The prefix for the LDAP search filter | No | (empty string) |
| ldap/filterSuffix | The suffix for the LDAP search filter | No | (empty string) |
| ldap/ldapRoleAttribute | The name of the LDAP attribute that contains the role values | No | objectClass |
| ldap/ldapRoleMap | This value maps role attribute values from LDAP to the fascinator roles. If the role attribute value does not exist in the mapping, the user will not have any roles. | Yes | (empty list) |
"roles": {
"type": "ldap",
"ldap": {
"baseURL": "ldap://ldap.uq.edu.au:389",
"baseDN": "ou=people,o=The University of Queensland,c=AU",
"idAttribute": "uid",
"filterPrefix": "uniquemember=",
"filterSuffix": ",ou=people,dc=adelaide,dc=edu,dc=au",
"ldapRoleAttribute": "cn",
"ldapRoleMap": [
{
"ldapRoleAttrValue": "TFREG"
"roles": ["registered"]
},
{
"ldapRoleAttrValue": "TFADM"
"roles": ["admin"]
}
]
}
}
None
| Constructor Summary | |
|---|---|
LDAPRoles()
|
|
| Method Summary | |
|---|---|
void |
createRole(String rolename)
Create a role. |
void |
deleteRole(String rolename)
Delete a role. |
String |
getId()
|
String |
getName()
|
com.googlecode.fascinator.api.PluginDescription |
getPluginDetails()
Gets a PluginDescription object relating to this plugin. |
String[] |
getRoles(String username)
Find and return all roles this user has. |
String[] |
getUsersInRole(String role)
Returns a list of users who have a particular role. |
void |
init(File jsonFile)
|
void |
init(String jsonString)
|
void |
removeRole(String username,
String oldrole)
Remove a role from a user. |
void |
renameRole(String oldrole,
String newrole)
Rename a role. |
String[] |
searchRoles(String search)
Returns a list of roles matching the search. |
void |
setConfig(com.googlecode.fascinator.common.JsonSimpleConfig config)
|
void |
setRole(String username,
String newrole)
Assign a role to a user. |
void |
shutdown()
|
boolean |
supportsRoleManagement()
Method for testing if the implementing plugin allows the creation, deletion and modification of roles. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LDAPRoles()
| 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.roles.RolesException
init in interface com.googlecode.fascinator.api.Plugincom.googlecode.fascinator.api.roles.RolesException
public void init(File jsonFile)
throws com.googlecode.fascinator.api.roles.RolesException
init in interface com.googlecode.fascinator.api.Plugincom.googlecode.fascinator.api.roles.RolesException
public void setConfig(com.googlecode.fascinator.common.JsonSimpleConfig config)
throws IOException
IOException
public void shutdown()
throws com.googlecode.fascinator.api.roles.RolesException
shutdown in interface com.googlecode.fascinator.api.Plugincom.googlecode.fascinator.api.roles.RolesExceptionpublic String[] getRoles(String username)
getRoles in interface com.googlecode.fascinator.api.roles.Rolesusername - The username of the user.
public String[] getUsersInRole(String role)
getUsersInRole in interface com.googlecode.fascinator.api.roles.Rolesrole - The role to search for.
public boolean supportsRoleManagement()
supportsRoleManagement in interface com.googlecode.fascinator.api.roles.Roles
public void setRole(String username,
String newrole)
throws com.googlecode.fascinator.api.roles.RolesException
setRole in interface com.googlecode.fascinator.api.roles.Rolesusername - The username of the user.newrole - The new role to assign the user.
com.googlecode.fascinator.api.roles.RolesException - if there was an error during assignment.
public void removeRole(String username,
String oldrole)
throws com.googlecode.fascinator.api.roles.RolesException
removeRole in interface com.googlecode.fascinator.api.roles.Rolesusername - The username of the user.oldrole - The role to remove from the user.
com.googlecode.fascinator.api.roles.RolesException - if there was an error during removal.
public void createRole(String rolename)
throws com.googlecode.fascinator.api.roles.RolesException
createRole in interface com.googlecode.fascinator.api.roles.Rolesrolename - The name of the new role.
com.googlecode.fascinator.api.roles.RolesException - if there was an error creating the role.
public void deleteRole(String rolename)
throws com.googlecode.fascinator.api.roles.RolesException
deleteRole in interface com.googlecode.fascinator.api.roles.Rolesrolename - The name of the role to delete.
com.googlecode.fascinator.api.roles.RolesException - if there was an error during deletion.
public void renameRole(String oldrole,
String newrole)
throws com.googlecode.fascinator.api.roles.RolesException
renameRole in interface com.googlecode.fascinator.api.roles.Rolesoldrole - The name role currently has.newrole - The name role is changing to.
com.googlecode.fascinator.api.roles.RolesException - if there was an error during rename.
public String[] searchRoles(String search)
throws com.googlecode.fascinator.api.roles.RolesException
searchRoles in interface com.googlecode.fascinator.api.roles.Rolessearch - The search string to execute.
com.googlecode.fascinator.api.roles.RolesException - if there was an error searching.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||