From db4673ceee4fa1478fc12bb5536b2d40e4c3bf51 Mon Sep 17 00:00:00 2001 From: _Bastler Date: Sat, 8 Nov 2025 19:24:00 +0100 Subject: [PATCH] upgrade spring boot --- .../bstly/we/security/LocalAuthenticationProvider.java | 2 +- .../main/java/de/bstly/we/security/SecurityConfig.java | 9 +++++---- pom.xml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/de/bstly/we/security/LocalAuthenticationProvider.java b/core/src/main/java/de/bstly/we/security/LocalAuthenticationProvider.java index a1b4450..83b1074 100755 --- a/core/src/main/java/de/bstly/we/security/LocalAuthenticationProvider.java +++ b/core/src/main/java/de/bstly/we/security/LocalAuthenticationProvider.java @@ -35,7 +35,7 @@ public class LocalAuthenticationProvider extends DaoAuthenticationProvider { * @param userDetailService the user detail service */ public LocalAuthenticationProvider(UserDetailsService userDetailService) { - setUserDetailsService(userDetailService); + super(userDetailService); } /* diff --git a/core/src/main/java/de/bstly/we/security/SecurityConfig.java b/core/src/main/java/de/bstly/we/security/SecurityConfig.java index 6dbfe87..d20468f 100755 --- a/core/src/main/java/de/bstly/we/security/SecurityConfig.java +++ b/core/src/main/java/de/bstly/we/security/SecurityConfig.java @@ -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(); diff --git a/pom.xml b/pom.xml index e7a3c36..6517e89 100755 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.springframework.boot spring-boot-starter-parent - 3.4.5 + 3.5.7