Class LdapAuthenticationProvider
- java.lang.Object
-
- io.micronaut.configuration.security.ldap.LdapAuthenticationProvider
-
- All Implemented Interfaces:
AuthenticationProvider,java.io.Closeable,java.lang.AutoCloseable
@EachBean(LdapConfiguration.class) public class LdapAuthenticationProvider extends java.lang.Object implements AuthenticationProvider, java.io.Closeable
Authenticates against an LDAP server using the configuration provided throughLdapConfiguration. One provider will be created for each configuration.- Since:
- 1.0
- Author:
- James Kleeh
-
-
Constructor Summary
Constructors Constructor Description LdapAuthenticationProvider(LdapConfiguration configuration, LdapSearchService ldapSearchService, ContextBuilder contextBuilder, ContextAuthenticationMapper contextAuthenticationMapper, LdapGroupProcessor ldapGroupProcessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.reactivestreams.Publisher<AuthenticationResponse>authenticate(AuthenticationRequest authenticationRequest)Authenticates a user with the given request.voidclose()
-
-
-
Constructor Detail
-
LdapAuthenticationProvider
public LdapAuthenticationProvider(LdapConfiguration configuration, LdapSearchService ldapSearchService, ContextBuilder contextBuilder, ContextAuthenticationMapper contextAuthenticationMapper, LdapGroupProcessor ldapGroupProcessor)
- Parameters:
configuration- The configuration to use to authenticateldapSearchService- The search servicecontextBuilder- The context buildercontextAuthenticationMapper- The authentication mapperldapGroupProcessor- The group processor
-
-
Method Detail
-
authenticate
public org.reactivestreams.Publisher<AuthenticationResponse> authenticate(AuthenticationRequest authenticationRequest)
Description copied from interface:AuthenticationProviderAuthenticates a user with the given request. If a successful authentication is returned, the object must be an instance ofUserDetails.- Specified by:
authenticatein interfaceAuthenticationProvider- Parameters:
authenticationRequest- The request to authenticate- Returns:
- A publisher that emits 0 or 1 responses
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-