Class LdapRolesMappingProvider
- java.lang.Object
-
- org.jboss.security.mapping.providers.role.AbstractRolesMappingProvider
-
- org.jboss.security.mapping.providers.role.LdapRolesMappingProvider
-
- All Implemented Interfaces:
MappingProvider<RoleGroup>
public class LdapRolesMappingProvider extends AbstractRolesMappingProvider
A mapping provider that assigns roles to an user using a LDAP server to search for the roles.- Author:
- Marcus Moyses, Andy Oliver, Scott.Stark@jboss.org
-
-
Field Summary
Fields Modifier and Type Field Description protected String
bindCredential
protected String
bindDN
protected Map<String,Object>
options
protected boolean
parseRoleNameFromDN
protected int
recursion
protected String
roleAttributeID
protected boolean
roleAttributeIsDN
protected String
roleFilter
protected String
roleNameAttributeID
protected String
rolesCtxDN
protected int
searchScope
protected int
searchTimeLimit
-
Fields inherited from class org.jboss.security.mapping.providers.role.AbstractRolesMappingProvider
result
-
-
Constructor Summary
Constructors Constructor Description LdapRolesMappingProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InitialLdapContext
constructInitialLdapContext(String dn, Object credential)
void
init(Map<String,Object> options)
Initialize the provider with the configured module optionsvoid
performMapping(Map<String,Object> contextMap, RoleGroup mappedObject)
Map the passed objectprotected void
rolesSearch(InitialLdapContext ctx, SearchControls constraints, String user, int recursionMax, int nesting, RoleGroup roleGroup)
protected void
rolesSearch(InitialLdapContext ctx, SearchControls constraints, String user, String previousRoleDn, int recursionMax, int nesting, RoleGroup roleGroup)
-
Methods inherited from class org.jboss.security.mapping.providers.role.AbstractRolesMappingProvider
getCallerPrincipal, setMappingResult, supports
-
-
-
-
Field Detail
-
bindDN
protected String bindDN
-
bindCredential
protected String bindCredential
-
rolesCtxDN
protected String rolesCtxDN
-
roleFilter
protected String roleFilter
-
roleAttributeID
protected String roleAttributeID
-
roleNameAttributeID
protected String roleNameAttributeID
-
roleAttributeIsDN
protected boolean roleAttributeIsDN
-
parseRoleNameFromDN
protected boolean parseRoleNameFromDN
-
recursion
protected int recursion
-
searchTimeLimit
protected int searchTimeLimit
-
searchScope
protected int searchScope
-
-
Method Detail
-
init
public void init(Map<String,Object> options)
Description copied from interface:MappingProvider
Initialize the provider with the configured module options
-
performMapping
public void performMapping(Map<String,Object> contextMap, RoleGroup mappedObject)
Description copied from interface:MappingProvider
Map the passed object- Parameters:
contextMap
- A read-only contextual map that can provide information to the providermappedObject
- an Object on which the mapping will be applied
-
constructInitialLdapContext
protected InitialLdapContext constructInitialLdapContext(String dn, Object credential) throws NamingException
- Throws:
NamingException
-
rolesSearch
protected void rolesSearch(InitialLdapContext ctx, SearchControls constraints, String user, int recursionMax, int nesting, RoleGroup roleGroup) throws NamingException
- Throws:
NamingException
-
rolesSearch
protected void rolesSearch(InitialLdapContext ctx, SearchControls constraints, String user, String previousRoleDn, int recursionMax, int nesting, RoleGroup roleGroup) throws NamingException
- Throws:
NamingException
-
-