Class NetgrifLdapAuthenticationProvider
- java.lang.Object
-
- com.netgrif.application.engine.configuration.authentication.providers.NetgrifAuthenticationProvider
-
- com.netgrif.application.engine.configuration.authentication.providers.ldap.NetgrifLdapAuthenticationProvider
-
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
@Component @ConditionalOnExpression("${nae.ldap.enabled:false}") public class NetgrifLdapAuthenticationProvider extends NetgrifAuthenticationProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.security.ldap.authentication.LdapAuthenticatorauthenticatorprotected org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulatorauthoritiesPopulatorprotected booleanhideUserNotFoundExceptionsprotected NaeLdapPropertiesldapPropertiesprotected java.lang.StringpasswordAttributeprotected org.springframework.security.crypto.password.PasswordEncoderpasswordEncoderprotected booleanuseAuthenticationRequestCredentialsprotected org.springframework.security.ldap.userdetails.UserDetailsContextMapperuserDetailsContextMapper-
Fields inherited from class com.netgrif.application.engine.configuration.authentication.providers.NetgrifAuthenticationProvider
loginAttemptService, publisher, request, userDetailsService
-
-
Constructor Summary
Constructors Constructor Description NetgrifLdapAuthenticationProvider(NaeLdapProperties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication)org.springframework.ldap.core.support.BaseLdapPathContextSourcecontextSource()protected org.springframework.security.ldap.authentication.BindAuthenticatorcreateBindAuthenticator(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource)protected org.springframework.security.ldap.authentication.LdapAuthenticatorcreateLdapAuthenticator(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource)protected org.springframework.security.ldap.authentication.PasswordComparisonAuthenticatorcreatePasswordCompareAuthenticator(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource)protected org.springframework.security.core.AuthenticationcreateSuccessfulAuthentication(org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication, org.springframework.security.core.userdetails.UserDetails user)protected org.springframework.security.ldap.authentication.LdapAuthenticatorgetAuthenticator()protected org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulatorgetAuthoritiesPopulator()protected java.util.Collection<org.springframework.security.core.GrantedAuthority>loadUserAuthorities(org.springframework.ldap.core.DirContextOperations userData, java.lang.String username, java.lang.String password)protected voidsetAuthenticator(org.springframework.security.ldap.authentication.LdapAuthenticator authenticator)protected voidsetAuthoritiesPopulator(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator)voidsetUseAuthenticationRequestCredentials(boolean useAuthenticationRequestCredentials)voidsetUserDetailsContextMapper(org.springframework.security.ldap.userdetails.UserDetailsContextMapper userDetailsContextMapper)booleansupports(java.lang.Class<? extends java.lang.Object> authentication)-
Methods inherited from class com.netgrif.application.engine.configuration.authentication.providers.NetgrifAuthenticationProvider
getClientIP, loadUserByUsername
-
-
-
-
Field Detail
-
ldapProperties
protected NaeLdapProperties ldapProperties
-
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:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Specified by:
authenticatein classNetgrifAuthenticationProvider- 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:
supportsin interfaceorg.springframework.security.authentication.AuthenticationProvider- Specified by:
supportsin classNetgrifAuthenticationProvider
-
-