List of usage examples for org.springframework.security.oauth2.provider.expression OAuth2WebSecurityExpressionHandler OAuth2WebSecurityExpressionHandler
public OAuth2WebSecurityExpressionHandler()
From source file:nl.capgemini.corpapp.config.OAuth2ResourceServerConfiguration.java
@Override public void configure(HttpSecurity http) throws Exception { // @formatter:off http.authorizeRequests().expressionHandler(new OAuth2WebSecurityExpressionHandler()) .antMatchers("/rest/user/register").anonymous().antMatchers("/rest/**") .access("#oauth2.clientHasRole('ROLE_CLIENT') or hasRole('ROLE_USER')").and().requestMatchers() .antMatchers("/rest/**"); // @formatter:on }