Java Code Examples for org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler

The following examples show how to use org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler. These examples are extracted from open source projects. 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
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
	if (bean instanceof DefaultMethodSecurityExpressionHandler
			&& !(bean instanceof OAuth2MethodSecurityExpressionHandler)) {
		return getExpressionHandler((DefaultMethodSecurityExpressionHandler) bean);
	}
	return bean;
}
 
Example 2
private OAuth2MethodSecurityExpressionHandler getExpressionHandler(
		DefaultMethodSecurityExpressionHandler bean) {
	OAuth2MethodSecurityExpressionHandler handler = new OAuth2MethodSecurityExpressionHandler();
	handler.setApplicationContext(this.applicationContext);
	AuthenticationTrustResolver trustResolver = findInContext(AuthenticationTrustResolver.class);
	if (trustResolver != null) {
		handler.setTrustResolver(trustResolver);
	}
	handler.setExpressionParser(bean.getExpressionParser());
	return handler;
}
 
Example 3
Source Project: Spring-5.0-Projects   Source File: MethodSecurityConfig.java    License: MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
	return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 4
Source Project: oauth2lab   Source File: MethodSecurityConfig.java    License: MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 5
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
	return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 6
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 7
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 8
Source Project: DAFramework   Source File: MethodSecurityConfig.java    License: MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 9
Source Project: konker-platform   Source File: MethodSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
	return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 10
Source Project: konker-platform   Source File: MethodSecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
	return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 11
Source Project: spring-security-oauth   Source File: MethodSecurityConfig.java    License: MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 12
Source Project: spring-security-oauth   Source File: MethodSecurityConfig.java    License: MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 13
Source Project: NFVO   Source File: SecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
  return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 14
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 15
Source Project: fullstop   Source File: MethodSecurityConfiguration.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 16
Source Project: cukes   Source File: OAuthSampleApplication.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 17
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 18
Source Project: omh-dsu-ri   Source File: MethodSecurityConfiguration.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example 19
Source Project: spring-boot   Source File: OAuth2ResourceServerConfig.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 启用 #oauth2 表达式验证
 *
 * @return
 */
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}