Class BroadleafAdminLdapUserDetailsMapper
java.lang.Object
org.springframework.security.ldap.userdetails.LdapUserDetailsMapper
org.broadleafcommerce.openadmin.server.security.external.BroadleafAdminLdapUserDetailsMapper
- All Implemented Interfaces:
org.springframework.security.ldap.userdetails.UserDetailsContextMapper
public class BroadleafAdminLdapUserDetailsMapper
extends org.springframework.security.ldap.userdetails.LdapUserDetailsMapper
This is used to map LDAP principal and authorities into BLC security model.
- Author:
- Kelly Tisdell
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AdminUserProvisioningServiceprotected AdminSecurityService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SitedetermineSite(org.springframework.ldap.core.DirContextOperations ctx, String username, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Allows for a hook to determine the Multi-Tenant site for this user from the ctx, username, and authorities.org.springframework.security.core.userdetails.UserDetailsmapUserFromContext(org.springframework.ldap.core.DirContextOperations ctx, String username, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Methods inherited from class org.springframework.security.ldap.userdetails.LdapUserDetailsMapper
createAuthority, mapPassword, mapUserToContext, setConvertToUpperCase, setPasswordAttributeName, setRoleAttributes, setRolePrefix
-
Field Details
-
securityService
-
provisioningService
-
-
Constructor Details
-
BroadleafAdminLdapUserDetailsMapper
public BroadleafAdminLdapUserDetailsMapper()
-
-
Method Details
-
mapUserFromContext
public org.springframework.security.core.userdetails.UserDetails mapUserFromContext(org.springframework.ldap.core.DirContextOperations ctx, String username, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) - Specified by:
mapUserFromContextin interfaceorg.springframework.security.ldap.userdetails.UserDetailsContextMapper- Overrides:
mapUserFromContextin classorg.springframework.security.ldap.userdetails.LdapUserDetailsMapper
-
determineSite
protected Site determineSite(org.springframework.ldap.core.DirContextOperations ctx, String username, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Allows for a hook to determine the Multi-Tenant site for this user from the ctx, username, and authorities. Default is to return null (no site). Implementors may wish to subclass this to determine the Site from the context.If the user is not associated with the current site, or if there is a problem determining the Site, an instance of
org.springframework.security.core.AuthenticationExceptionshould be thrown.- Returns:
-