File tree Expand file tree Collapse file tree 6 files changed +24
-0
lines changed
Expand file tree Collapse file tree 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
7171 authorizationServer
7272 .oidc (Customizer .withDefaults ()) // Enable OpenID Connect 1.0
7373 )
74+ .authorizeHttpRequests ((authorize ) ->
75+ authorize
76+ .anyRequest ().authenticated ()
77+ )
7478 // Redirect to the login page when not authenticated from the
7579 // authorization endpoint
7680 .exceptionHandling ((exceptions ) -> exceptions
Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
4949 authorizationServer
5050 .oidc (Customizer .withDefaults ()) // Enable OpenID Connect 1.0
5151 )
52+ .authorizeHttpRequests ((authorize ) ->
53+ authorize
54+ .anyRequest ().authenticated ()
55+ )
5256 // Redirect to the login page when not authenticated from the
5357 // authorization endpoint
5458 .exceptionHandling ((exceptions ) -> exceptions
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
4444 .authenticationProviders (configureCustomClientMetadataConverters ()) // <2>
4545 )
4646 )
47+ )
48+ .authorizeHttpRequests ((authorize ) ->
49+ authorize
50+ .anyRequest ().authenticated ()
4751 );
4852 // @formatter:on
4953
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
4545 authorizationServer
4646 .oidc (Customizer .withDefaults ()) // Enable OpenID Connect 1.0
4747 )
48+ .authorizeHttpRequests ((authorize ) ->
49+ authorize
50+ .anyRequest ().authenticated ()
51+ )
4852 // Redirect to the OAuth 2.0 Login endpoint when not authenticated
4953 // from the authorization endpoint
5054 .exceptionHandling ((exceptions ) -> exceptions
Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
7070 authorizationServer
7171 .oidc (Customizer .withDefaults ()) // <2>
7272 )
73+ .authorizeHttpRequests ((authorize ) ->
74+ authorize
75+ .anyRequest ().authenticated ()
76+ )
7377 .exceptionHandling ((exceptions ) -> exceptions
7478 .defaultAuthenticationEntryPointFor (
7579 new LoginUrlAuthenticationEntryPoint ("/login" ),
Original file line number Diff line number Diff line change @@ -206,6 +206,10 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
206206 authorizationServer
207207 .oidc (Customizer .withDefaults ()) // Enable OpenID Connect 1.0
208208 )
209+ .authorizeHttpRequests ((authorize ) ->
210+ authorize
211+ .anyRequest ().authenticated ()
212+ )
209213 .exceptionHandling ((exceptions ) -> exceptions
210214 .defaultAuthenticationEntryPointFor (
211215 new LoginUrlAuthenticationEntryPoint ("/login" ),
You can’t perform that action at this time.
0 commit comments