|
@@ -21,7 +21,6 @@ import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.http.HttpMethod;
|
|
import org.springframework.http.HttpMethod;
|
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
|
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
|
-import org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer;
|
|
|
|
import org.springframework.security.oauth2.jwt.JwtDecoder;
|
|
import org.springframework.security.oauth2.jwt.JwtDecoder;
|
|
import org.springframework.security.oauth2.jwt.NimbusJwtDecoder;
|
|
import org.springframework.security.oauth2.jwt.NimbusJwtDecoder;
|
|
import org.springframework.security.web.SecurityFilterChain;
|
|
import org.springframework.security.web.SecurityFilterChain;
|
|
@@ -49,7 +48,7 @@ public class OAuth2ResourceServerSecurityConfiguration {
|
|
.requestMatchers(HttpMethod.POST, "/message/**").hasAuthority("SCOPE_message:write")
|
|
.requestMatchers(HttpMethod.POST, "/message/**").hasAuthority("SCOPE_message:write")
|
|
.anyRequest().authenticated()
|
|
.anyRequest().authenticated()
|
|
)
|
|
)
|
|
- .oauth2ResourceServer(oauth2 -> oauth2.jwt(withDefaults()));
|
|
|
|
|
|
+ .oauth2ResourceServer((oauth2) -> oauth2.jwt(withDefaults()));
|
|
// @formatter:on
|
|
// @formatter:on
|
|
return http.build();
|
|
return http.build();
|
|
}
|
|
}
|