}
@Override
protected void configure(HttpSecurity http) throws Exception {
RequestMatcherConfigurer requests = http.requestMatchers();
if (endpoints != null) {
// Assume we are in an Authorization Server
requests.requestMatchers(new NotOAuthRequestMatcher(endpoints.oauth2EndpointHandlerMapping()));
}
// @formatter:off
http
.exceptionHandling().accessDeniedHandler(accessDeniedHandler)
.and()