File tree 6 files changed +24
-0
lines changed
6 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
71
71
authorizationServer
72
72
.oidc (Customizer .withDefaults ()) // Enable OpenID Connect 1.0
73
73
)
74
+ .authorizeHttpRequests ((authorize ) ->
75
+ authorize
76
+ .anyRequest ().authenticated ()
77
+ )
74
78
// Redirect to the login page when not authenticated from the
75
79
// authorization endpoint
76
80
.exceptionHandling ((exceptions ) -> exceptions
Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
49
49
authorizationServer
50
50
.oidc (Customizer .withDefaults ()) // Enable OpenID Connect 1.0
51
51
)
52
+ .authorizeHttpRequests ((authorize ) ->
53
+ authorize
54
+ .anyRequest ().authenticated ()
55
+ )
52
56
// Redirect to the login page when not authenticated from the
53
57
// authorization endpoint
54
58
.exceptionHandling ((exceptions ) -> exceptions
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
44
44
.authenticationProviders (configureCustomClientMetadataConverters ()) // <2>
45
45
)
46
46
)
47
+ )
48
+ .authorizeHttpRequests ((authorize ) ->
49
+ authorize
50
+ .anyRequest ().authenticated ()
47
51
);
48
52
// @formatter:on
49
53
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
45
45
authorizationServer
46
46
.oidc (Customizer .withDefaults ()) // Enable OpenID Connect 1.0
47
47
)
48
+ .authorizeHttpRequests ((authorize ) ->
49
+ authorize
50
+ .anyRequest ().authenticated ()
51
+ )
48
52
// Redirect to the OAuth 2.0 Login endpoint when not authenticated
49
53
// from the authorization endpoint
50
54
.exceptionHandling ((exceptions ) -> exceptions
Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
70
70
authorizationServer
71
71
.oidc (Customizer .withDefaults ()) // <2>
72
72
)
73
+ .authorizeHttpRequests ((authorize ) ->
74
+ authorize
75
+ .anyRequest ().authenticated ()
76
+ )
73
77
.exceptionHandling ((exceptions ) -> exceptions
74
78
.defaultAuthenticationEntryPointFor (
75
79
new LoginUrlAuthenticationEntryPoint ("/login" ),
Original file line number Diff line number Diff line change @@ -206,6 +206,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
206
206
authorizationServer
207
207
.oidc (Customizer .withDefaults ()) // Enable OpenID Connect 1.0
208
208
)
209
+ .authorizeHttpRequests ((authorize ) ->
210
+ authorize
211
+ .anyRequest ().authenticated ()
212
+ )
209
213
.exceptionHandling ((exceptions ) -> exceptions
210
214
.defaultAuthenticationEntryPointFor (
211
215
new LoginUrlAuthenticationEntryPoint ("/login" ),
You can’t perform that action at this time.
0 commit comments