Class RolePreprocessingMapper
- java.lang.Object
-
- org.springframework.security.ldap.userdetails.LdapUserDetailsMapper
-
- org.pentaho.platform.plugin.services.security.userrole.ldap.RolePreprocessingMapper
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,org.springframework.security.ldap.userdetails.UserDetailsContextMapper
public class RolePreprocessingMapper extends org.springframework.security.ldap.userdetails.LdapUserDetailsMapper implements org.springframework.beans.factory.InitializingBean
Extension ofLdapUserDetailsMapper
which extracts the value of the component namedtokenName
within any attribute inroleAttributes
.Example LDIF:
dn: uid=admin,ou=users,ou=system ... uniqueMember: cn=ceo,ou=roles
Assume that you want the value of thecn
component within the value of theuniqueMember
attribute to be used as the role name. You would usemapper.setTokenName("cn")
or the equivalent to this setter call in your Spring beans XML.- Author:
- mlowery
-
-
Constructor Summary
Constructors Constructor Description RolePreprocessingMapper()
RolePreprocessingMapper(String tokenName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
protected org.springframework.security.core.GrantedAuthority
createAuthority(Object role)
String
getTokenName()
protected Object
preprocessRole(Object role)
void
setTokenName(String tokenName)
-
-
-
Constructor Detail
-
RolePreprocessingMapper
public RolePreprocessingMapper()
-
RolePreprocessingMapper
public RolePreprocessingMapper(String tokenName)
-
-
Method Detail
-
createAuthority
protected org.springframework.security.core.GrantedAuthority createAuthority(Object role)
- Overrides:
createAuthority
in classorg.springframework.security.ldap.userdetails.LdapUserDetailsMapper
-
setTokenName
public void setTokenName(String tokenName)
-
getTokenName
public String getTokenName()
-
-