Flatten HttpSecurity.oauth2()
Fixes gh-5715
This commit is contained in:
+3
-4
@@ -147,10 +147,9 @@ public class OAuth2AuthorizationCodeGrantApplicationTests {
|
||||
.authorizeRequests()
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
.oauth2()
|
||||
.client()
|
||||
.authorizationCodeGrant()
|
||||
.accessTokenResponseClient(this.accessTokenResponseClient());
|
||||
.oauth2Client()
|
||||
.authorizationCodeGrant()
|
||||
.accessTokenResponseClient(this.accessTokenResponseClient());
|
||||
}
|
||||
// @formatter:on
|
||||
|
||||
|
||||
@@ -41,8 +41,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.and()
|
||||
.formLogin()
|
||||
.and()
|
||||
.oauth2()
|
||||
.client();
|
||||
.oauth2Client();
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
||||
+3
-4
@@ -36,10 +36,9 @@ public class OAuth2ResourceServerSecurityConfiguration extends WebSecurityConfig
|
||||
.antMatchers("/message/**").access("hasAuthority('SCOPE_message:read')")
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
.oauth2()
|
||||
.resourceServer()
|
||||
.jwt()
|
||||
.jwkSetUri(this.jwkSetUri);
|
||||
.oauth2ResourceServer()
|
||||
.jwt()
|
||||
.jwkSetUri(this.jwkSetUri);
|
||||
// @formatter:on
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user