upgrade spring boot
This commit is contained in:
@@ -35,7 +35,7 @@ public class LocalAuthenticationProvider extends DaoAuthenticationProvider {
|
||||
* @param userDetailService the user detail service
|
||||
*/
|
||||
public LocalAuthenticationProvider(UserDetailsService userDetailService) {
|
||||
setUserDetailsService(userDetailService);
|
||||
super(userDetailService);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.security.web.authentication.rememberme.PersistentToke
|
||||
import org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy;
|
||||
import org.springframework.security.web.firewall.StrictHttpFirewall;
|
||||
import org.springframework.security.web.header.writers.ReferrerPolicyHeaderWriter.ReferrerPolicy;
|
||||
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
||||
import org.springframework.security.web.servlet.util.matcher.PathPatternRequestMatcher;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.CorsConfigurationSource;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
@@ -170,7 +170,8 @@ public class SecurityConfig {
|
||||
@Bean
|
||||
public LocalAuthenticationEntryPoint localAuthenticationEntryPoint() {
|
||||
LocalAuthenticationEntryPoint localAuthenticationEntryPoint = new LocalAuthenticationEntryPoint(loginUrl);
|
||||
localAuthenticationEntryPoint.addRequestMatcher(new AntPathRequestMatcher("/oidc/authorize"));
|
||||
localAuthenticationEntryPoint
|
||||
.addRequestMatcher(PathPatternRequestMatcher.withDefaults().matcher("/oidc/authorize"));
|
||||
|
||||
return localAuthenticationEntryPoint;
|
||||
}
|
||||
@@ -186,7 +187,8 @@ public class SecurityConfig {
|
||||
rememberMeServices(), tokenSessionManager, loginTargetUrl, SecurityConfig.KEEP_PARAM);
|
||||
formAuthenticationSuccessHandler.setTotpRedirectUrl(secondFactorUrl);
|
||||
formAuthenticationSuccessHandler.setTargetUrlParameter("forward");
|
||||
formAuthenticationSuccessHandler.addRequestMatcher(new AntPathRequestMatcher("/oidc/authorize"));
|
||||
formAuthenticationSuccessHandler
|
||||
.addRequestMatcher(PathPatternRequestMatcher.withDefaults().matcher("/oidc/authorize"));
|
||||
return formAuthenticationSuccessHandler;
|
||||
}
|
||||
|
||||
@@ -206,7 +208,6 @@ public class SecurityConfig {
|
||||
public AuthenticationManager authenticationManager(HttpSecurity http) throws Exception {
|
||||
AuthenticationManagerBuilder authenticationManagerBuilder = http
|
||||
.getSharedObject(AuthenticationManagerBuilder.class);
|
||||
localAuthenticationProvider.setUserDetailsService(localUserDetailsService);
|
||||
localAuthenticationProvider.setPasswordEncoder(passwordEncoder);
|
||||
authenticationManagerBuilder.authenticationProvider(localAuthenticationProvider);
|
||||
return authenticationManagerBuilder.build();
|
||||
|
||||
Reference in New Issue
Block a user