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 StringbindCredentialprotected StringbindDNprotected Map<String,Object>optionsprotected booleanparseRoleNameFromDNprotected intrecursionprotected StringroleAttributeIDprotected booleanroleAttributeIsDNprotected StringroleFilterprotected StringroleNameAttributeIDprotected StringrolesCtxDNprotected intsearchScopeprotected intsearchTimeLimit-
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 InitialLdapContextconstructInitialLdapContext(String dn, Object credential)voidinit(Map<String,Object> options)Initialize the provider with the configured module optionsvoidperformMapping(Map<String,Object> contextMap, RoleGroup mappedObject)Map the passed objectprotected voidrolesSearch(InitialLdapContext ctx, SearchControls constraints, String user, int recursionMax, int nesting, RoleGroup roleGroup)protected voidrolesSearch(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:MappingProviderInitialize the provider with the configured module options
-
performMapping
public void performMapping(Map<String,Object> contextMap, RoleGroup mappedObject)
Description copied from interface:MappingProviderMap 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
-
-