corrected ant matchers
This commit is contained in:
parent
3147007632
commit
b3a089d6b3
@ -11,6 +11,7 @@ import org.springframework.security.oauth2.client.registration.InMemoryClientReg
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
import org.springframework.security.web.authentication.session.NullAuthenticatedSessionStrategy;
|
||||
import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy;
|
||||
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -34,7 +35,12 @@ public class SecurityConfiguration {
|
||||
// @formatter:off
|
||||
.oauth2Login(o -> o.defaultSuccessUrl("/"))
|
||||
.logout(o -> o.logoutSuccessHandler(new OidcClientInitiatedLogoutSuccessHandler(crr)))
|
||||
.authorizeHttpRequests(o -> o.requestMatchers("/dashboard/**", "/business/**", "/confirmation/**", "/userlogin/**").authenticated()
|
||||
.authorizeHttpRequests(o -> o.requestMatchers(
|
||||
AntPathRequestMatcher.antMatcher("/dashboard/**"),
|
||||
AntPathRequestMatcher.antMatcher("/business/**"),
|
||||
AntPathRequestMatcher.antMatcher("/confirmation/**"),
|
||||
AntPathRequestMatcher.antMatcher("/userlogin/**")
|
||||
).authenticated()
|
||||
.anyRequest().permitAll())
|
||||
.oauth2ResourceServer(o -> o.jwt(Customizer.withDefaults()))
|
||||
.sessionManagement(o -> o.init(sec));
|
||||
|
Loading…
x
Reference in New Issue
Block a user