Class NetgrifLdapAuthenticationProvider

  • All Implemented Interfaces:
    org.springframework.security.authentication.AuthenticationProvider

    @Component
    @ConditionalOnExpression("${nae.ldap.enabled:false}")
    public class NetgrifLdapAuthenticationProvider
    extends NetgrifAuthenticationProvider
    • Field Detail

      • passwordEncoder

        protected org.springframework.security.crypto.password.PasswordEncoder passwordEncoder
      • passwordAttribute

        protected java.lang.String passwordAttribute
      • authenticator

        protected org.springframework.security.ldap.authentication.LdapAuthenticator authenticator
      • authoritiesPopulator

        protected org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator
      • userDetailsContextMapper

        protected org.springframework.security.ldap.userdetails.UserDetailsContextMapper userDetailsContextMapper
      • useAuthenticationRequestCredentials

        protected boolean useAuthenticationRequestCredentials
      • hideUserNotFoundExceptions

        protected boolean hideUserNotFoundExceptions
    • Constructor Detail

      • NetgrifLdapAuthenticationProvider

        public NetgrifLdapAuthenticationProvider​(NaeLdapProperties properties)
    • Method Detail

      • contextSource

        public org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource()
      • createBindAuthenticator

        protected org.springframework.security.ldap.authentication.BindAuthenticator createBindAuthenticator​(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource)
      • createPasswordCompareAuthenticator

        protected org.springframework.security.ldap.authentication.PasswordComparisonAuthenticator createPasswordCompareAuthenticator​(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource)
      • createLdapAuthenticator

        protected org.springframework.security.ldap.authentication.LdapAuthenticator createLdapAuthenticator​(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource)
      • setAuthenticator

        protected void setAuthenticator​(org.springframework.security.ldap.authentication.LdapAuthenticator authenticator)
      • getAuthenticator

        protected org.springframework.security.ldap.authentication.LdapAuthenticator getAuthenticator()
      • setAuthoritiesPopulator

        protected void setAuthoritiesPopulator​(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator)
      • getAuthoritiesPopulator

        protected org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator getAuthoritiesPopulator()
      • setUserDetailsContextMapper

        public void setUserDetailsContextMapper​(org.springframework.security.ldap.userdetails.UserDetailsContextMapper userDetailsContextMapper)
      • setUseAuthenticationRequestCredentials

        public void setUseAuthenticationRequestCredentials​(boolean useAuthenticationRequestCredentials)
      • authenticate

        public org.springframework.security.core.Authentication authenticate​(org.springframework.security.core.Authentication authentication)
                                                                      throws org.springframework.security.core.AuthenticationException
        Specified by:
        authenticate in interface org.springframework.security.authentication.AuthenticationProvider
        Specified by:
        authenticate in class NetgrifAuthenticationProvider
        Throws:
        org.springframework.security.core.AuthenticationException
      • loadUserAuthorities

        protected java.util.Collection<org.springframework.security.core.GrantedAuthority> loadUserAuthorities​(org.springframework.ldap.core.DirContextOperations userData,
                                                                                                               java.lang.String username,
                                                                                                               java.lang.String password)
      • createSuccessfulAuthentication

        protected org.springframework.security.core.Authentication createSuccessfulAuthentication​(org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication,
                                                                                                  org.springframework.security.core.userdetails.UserDetails user)
      • supports

        public boolean supports​(java.lang.Class<? extends java.lang.Object> authentication)
        Specified by:
        supports in interface org.springframework.security.authentication.AuthenticationProvider
        Specified by:
        supports in class NetgrifAuthenticationProvider