upgrade spring boot

This commit is contained in:
2025-11-08 19:24:00 +01:00
parent 6d177d4176
commit db4673ceee
3 changed files with 7 additions and 6 deletions
@@ -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();
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.5</version>
<version>3.5.7</version>
<relativePath />
</parent>