|
@@ -70,20 +70,21 @@ public class OAuth2AuthorizationServerSecurityConfiguration {
|
|
@Order(Ordered.HIGHEST_PRECEDENCE)
|
|
@Order(Ordered.HIGHEST_PRECEDENCE)
|
|
public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity http) throws Exception {
|
|
public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity http) throws Exception {
|
|
OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(http);
|
|
OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(http);
|
|
- http.getConfigurer(OAuth2AuthorizationServerConfigurer.class)
|
|
|
|
- .oidc(Customizer.withDefaults()); // Enable OpenID Connect 1.0
|
|
|
|
|
|
+ http.getConfigurer(OAuth2AuthorizationServerConfigurer.class).oidc(Customizer.withDefaults()); // Enable
|
|
|
|
+ // OpenID
|
|
|
|
+ // Connect
|
|
|
|
+ // 1.0
|
|
|
|
|
|
// @formatter:off
|
|
// @formatter:off
|
|
http
|
|
http
|
|
- .exceptionHandling(exceptions ->
|
|
|
|
- exceptions.authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/login"))
|
|
|
|
|
|
+ .exceptionHandling((exceptions) -> exceptions
|
|
|
|
+ .authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/login"))
|
|
)
|
|
)
|
|
- .oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt);
|
|
|
|
|
|
+ .oauth2ResourceServer((resourceServer) -> resourceServer.jwt(Customizer.withDefaults()));
|
|
// @formatter:on
|
|
// @formatter:on
|
|
return http.build();
|
|
return http.build();
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
@Bean
|
|
@Bean
|
|
@Order(2)
|
|
@Order(2)
|
|
public SecurityFilterChain standardSecurityFilterChain(HttpSecurity http) throws Exception {
|
|
public SecurityFilterChain standardSecurityFilterChain(HttpSecurity http) throws Exception {
|