org.zalando.stups.oauth2.spring.security.expression.ExtendedOAuth2WebSecurityExpressionHandler Java Examples
The following examples show how to use
org.zalando.stups.oauth2.spring.security.expression.ExtendedOAuth2WebSecurityExpressionHandler.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SecurityConfiguration.java From nakadi with MIT License | 5 votes |
@Override public void configure(final ResourceServerSecurityConfigurer resources) throws Exception { final OAuth2AuthenticationEntryPoint oAuth2AuthenticationEntryPoint = new OAuth2AuthenticationEntryPoint(); oAuth2AuthenticationEntryPoint.setExceptionRenderer(new ProblemOauthExceptionRenderer()); resources.authenticationEntryPoint(oAuth2AuthenticationEntryPoint); resources.tokenServices(tokenServices); resources.expressionHandler(new ExtendedOAuth2WebSecurityExpressionHandler()); final OAuth2AccessDeniedHandler oAuth2AccessDeniedHandler = new OAuth2AccessDeniedHandler(); oAuth2AccessDeniedHandler.setExceptionRenderer(new ProblemOauthExceptionRenderer()); resources.accessDeniedHandler(oAuth2AccessDeniedHandler); }
Example #2
Source File: OAuthConfiguration.java From pazuzu-registry with MIT License | 4 votes |
@Override public void configure(ResourceServerSecurityConfigurer resources) throws Exception { // here is the important part for stups-expression-handler resources.expressionHandler(new ExtendedOAuth2WebSecurityExpressionHandler()); }
Example #3
Source File: AuthenticationTest.java From nakadi with MIT License | 4 votes |
public ExtendedOAuth2WebSecurityExpressionHandler extendedOAuth2WebSecurityExpressionHandler() { return mock(ExtendedOAuth2WebSecurityExpressionHandler.class); }
Example #4
Source File: OAuth2Configuration.java From fullstop with Apache License 2.0 | 4 votes |
@Override public void configure(final ResourceServerSecurityConfigurer resources) throws Exception { // add support for #oauth2.hasUidScopeAndAnyRealm() expressions resources .expressionHandler(new ExtendedOAuth2WebSecurityExpressionHandler()); }