Class LdapConfiguration

java.lang.Object
fr.enedis.chutney.security.infra.ldap.LdapConfiguration

@Configuration @Profile("ldap-auth") public class LdapConfiguration extends Object
  • Constructor Details

    • LdapConfiguration

      public LdapConfiguration()
  • Method Details

    • contextSource

      @Bean @ConfigurationProperties("ldap.source") public org.springframework.ldap.core.support.LdapContextSource contextSource()
    • ldapAttributesProperties

      @Bean @ConfigurationProperties("ldap.attributes") public LdapAttributesProperties ldapAttributesProperties()
    • ldapTemplate

      @Bean public org.springframework.ldap.core.LdapTemplate ldapTemplate(org.springframework.ldap.core.support.LdapContextSource contextSource)
    • attributesMapper

      @Bean public org.springframework.ldap.core.AttributesMapper<UserDto> attributesMapper(LdapAttributesProperties ldapAttributesProperties, @Value("${ldap.groups-pattern}") String ldapGroupsPattern)
    • ldapUserDetailsService

      @Bean public LdapUserDetailsService ldapUserDetailsService(org.springframework.ldap.core.LdapTemplate ldapTemplate, LdapAttributesProperties ldapAttributesProperties, org.springframework.ldap.core.AttributesMapper<UserDto> attributesMapper, AuthenticationService authenticationService, @Value("${ldap.user-search-scope:null}") String userSearchScope)
    • userDetailsContextMapper

      @Bean public org.springframework.security.ldap.userdetails.UserDetailsContextMapper userDetailsContextMapper(LdapUserDetailsService ldapUserDetailsService)