Update HttpSecurity Formatting

This commit is contained in:
Josh Cummings
2021-11-10 09:42:09 -07:00
parent 3a4eec6eda
commit 3a58daf55d
27 changed files with 98 additions and 100 deletions

View File

@@ -72,15 +72,11 @@ public class OAuth2ResourceServerSecurityConfiguration extends WebSecurityConfig
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
http
.authorizeRequests((requests) ->
requests
.antMatchers("/message/**").hasAuthority("SCOPE_message:read")
.anyRequest().authenticated()
.authorizeRequests((authorize) -> authorize
.antMatchers("/message/**").hasAuthority("SCOPE_message:read")
.anyRequest().authenticated()
)
.oauth2ResourceServer((resourceServer) ->
resourceServer
.jwt(withDefaults())
);
.oauth2ResourceServer((oauth2) -> oauth2.jwt(withDefaults()));
// @formatter:on
}