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 Details

  • 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:
      mapUserFromContext in interface org.springframework.security.ldap.userdetails.UserDetailsContextMapper
      Overrides:
      mapUserFromContext in class org.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.AuthenticationException should be thrown.

      Returns: