Expose default security configuration

Closes gh-110
This commit is contained in:
Joe Grandja 2020-10-13 14:32:25 -04:00
parent 142876068d
commit 45283b42b4

View File

@ -33,9 +33,13 @@ import static org.springframework.security.config.Customizer.withDefaults;
@Order(Ordered.HIGHEST_PRECEDENCE)
public class OAuth2AuthorizationServerSecurity extends WebSecurityConfigurerAdapter {
// @formatter:off
@Override
protected void configure(HttpSecurity http) throws Exception {
applyDefaultConfiguration(http);
}
// @formatter:off
public static void applyDefaultConfiguration(HttpSecurity http) throws Exception {
OAuth2AuthorizationServerConfigurer<HttpSecurity> authorizationServerConfigurer =
new OAuth2AuthorizationServerConfigurer<>();
RequestMatcher[] endpointMatchers = authorizationServerConfigurer