Class UsernameAttributeLdapContextMapper

java.lang.Object
org.springframework.security.ldap.userdetails.LdapUserDetailsMapper
com.xebialabs.xlrelease.security.authentication.UsernameAttributeLdapContextMapper
All Implemented Interfaces:
org.springframework.security.ldap.userdetails.UserDetailsContextMapper

public class UsernameAttributeLdapContextMapper extends org.springframework.security.ldap.userdetails.LdapUserDetailsMapper
LdapUserDetailsMapper implementation to get original username from LDAP by using proper attribute name
  • Constructor Details

    • UsernameAttributeLdapContextMapper

      public UsernameAttributeLdapContextMapper()
  • 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
    • setLdapUsernameAttribute

      public void setLdapUsernameAttribute(String ldapUsernameAttribute)
      Parameters:
      ldapUsernameAttribute - Sets the name of the LDAP attribute to use for the username after authentication.
    • getLdapUsernameAttribute

      public String getLdapUsernameAttribute()