Class TestConfiguration
java.lang.Object
org.bremersee.spring.security.ldaptive.app.TestConfiguration
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan(basePackageClasses=TestConfiguration.class)
public class TestConfiguration
extends Object
The test configuration to test the ldaptive security.
- Author:
- Christian Bremer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticationManager(org.ldaptive.ConnectionFactory connectionFactory, LdaptiveAuthenticationProperties authenticationProperties, org.bremersee.spring.security.core.EmailToUsernameResolver emailToUsernameResolver) Authentication manager ldaptive authentication manager.Authentication properties ldaptive authentication properties.org.ldaptive.ConnectionFactoryConnection factory.org.bremersee.spring.security.core.EmailToUsernameResolveremailToUsernameConverter(org.ldaptive.ConnectionFactory connectionFactory, LdaptiveAuthenticationProperties authenticationProperties) Email to username converter email to username converter.
-
Constructor Details
-
TestConfiguration
public TestConfiguration()
-
-
Method Details
-
connectionFactory
@Bean public org.ldaptive.ConnectionFactory connectionFactory()Connection factory.- Returns:
- the connection factory
-
authenticationProperties
Authentication properties ldaptive authentication properties.- Returns:
- the ldaptive authentication properties
-
emailToUsernameConverter
@Bean public org.bremersee.spring.security.core.EmailToUsernameResolver emailToUsernameConverter(org.ldaptive.ConnectionFactory connectionFactory, LdaptiveAuthenticationProperties authenticationProperties) Email to username converter email to username converter.- Parameters:
connectionFactory- the connection factoryauthenticationProperties- the authentication properties- Returns:
- the email to username converter
-
authenticationManager
@Bean public LdaptiveAuthenticationManager authenticationManager(org.ldaptive.ConnectionFactory connectionFactory, LdaptiveAuthenticationProperties authenticationProperties, org.bremersee.spring.security.core.EmailToUsernameResolver emailToUsernameResolver) Authentication manager ldaptive authentication manager.- Parameters:
connectionFactory- the connection factoryauthenticationProperties- the authentication propertiesemailToUsernameResolver- the email to username converter- Returns:
- the ldaptive authentication manager
-