Search in sources :

Example 1 with UserDetailsRepositoryReactiveAuthenticationManager

use of org.springframework.security.authentication.UserDetailsRepositoryReactiveAuthenticationManager in project spring-security by spring-projects.

the class ServerHttpSecurityConfigurationBuilder method httpWithDefaultAuthentication.

public static ServerHttpSecurity httpWithDefaultAuthentication() {
    ReactiveUserDetailsService reactiveUserDetailsService = ReactiveAuthenticationTestConfiguration.userDetailsService();
    ReactiveAuthenticationManager authenticationManager = new UserDetailsRepositoryReactiveAuthenticationManager(reactiveUserDetailsService);
    return http().authenticationManager(authenticationManager);
}
Also used : ReactiveAuthenticationManager(org.springframework.security.authentication.ReactiveAuthenticationManager) UserDetailsRepositoryReactiveAuthenticationManager(org.springframework.security.authentication.UserDetailsRepositoryReactiveAuthenticationManager) UserDetailsRepositoryReactiveAuthenticationManager(org.springframework.security.authentication.UserDetailsRepositoryReactiveAuthenticationManager) ReactiveUserDetailsService(org.springframework.security.core.userdetails.ReactiveUserDetailsService)

Example 2 with UserDetailsRepositoryReactiveAuthenticationManager

use of org.springframework.security.authentication.UserDetailsRepositoryReactiveAuthenticationManager in project spring-security by spring-projects.

the class ServerHttpSecurityConfiguration method authenticationManager.

private ReactiveAuthenticationManager authenticationManager() {
    if (this.authenticationManager != null) {
        return this.authenticationManager;
    }
    if (this.reactiveUserDetailsService != null) {
        UserDetailsRepositoryReactiveAuthenticationManager manager = new UserDetailsRepositoryReactiveAuthenticationManager(this.reactiveUserDetailsService);
        if (this.passwordEncoder != null) {
            manager.setPasswordEncoder(this.passwordEncoder);
        }
        manager.setUserDetailsPasswordService(this.userDetailsPasswordService);
        return manager;
    }
    return null;
}
Also used : UserDetailsRepositoryReactiveAuthenticationManager(org.springframework.security.authentication.UserDetailsRepositoryReactiveAuthenticationManager)

Aggregations

UserDetailsRepositoryReactiveAuthenticationManager (org.springframework.security.authentication.UserDetailsRepositoryReactiveAuthenticationManager)2 ReactiveAuthenticationManager (org.springframework.security.authentication.ReactiveAuthenticationManager)1 ReactiveUserDetailsService (org.springframework.security.core.userdetails.ReactiveUserDetailsService)1