Update HttpSecurity Formatting
This commit is contained in:
+5
-7
@@ -40,14 +40,12 @@ public class OAuth2ResourceServerSecurityConfiguration extends WebSecurityConfig
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
// @formatter:off
|
||||
http
|
||||
.authorizeRequests((requests) -> requests
|
||||
.mvcMatchers("/message/**").hasAuthority("SCOPE_message:read")
|
||||
.anyRequest().authenticated()
|
||||
.authorizeRequests((authorize) -> authorize
|
||||
.mvcMatchers("/message/**").hasAuthority("SCOPE_message:read")
|
||||
.anyRequest().authenticated()
|
||||
)
|
||||
.oauth2ResourceServer((resourceServer) -> resourceServer
|
||||
.jwt((jwt) -> jwt
|
||||
.decoder(jwtDecoder())
|
||||
)
|
||||
.oauth2ResourceServer((oauth2) -> oauth2
|
||||
.jwt((jwt) -> jwt.decoder(jwtDecoder()))
|
||||
);
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user