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

The following examples show how to use org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler. 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: OAuth2MethodSecurityConfiguration.java    From spring-security-oauth2-boot with Apache License 2.0 5 votes vote down vote up
@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
Source File: OAuth2MethodSecurityConfiguration.java    From spring-security-oauth2-boot with Apache License 2.0 5 votes vote down vote up
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 File: MethodSecurityConfig.java    From konker-platform with Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
	return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #4
Source File: MethodSecurityConfiguration.java    From omh-dsu-ri with Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #5
Source File: OAuth2MethodSecurityConfiguration.java    From spring-oauth-server with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #6
Source File: OAuthSampleApplication.java    From cukes with Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #7
Source File: MethodSecurityConfiguration.java    From fullstop with Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #8
Source File: GlobalMethodSecurityConfig.java    From edison-microservice with Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #9
Source File: SecurityConfig.java    From NFVO with Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
  return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #10
Source File: MethodSecurityConfig.java    From spring-security-oauth with MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #11
Source File: MethodSecurityConfig.java    From spring-security-oauth with MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #12
Source File: MethodSecurityConfig.java    From Spring-5.0-Projects with MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
	return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #13
Source File: MethodSecurityConfig.java    From konker-platform with Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
	return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #14
Source File: MethodSecurityConfig.java    From DAFramework with MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #15
Source File: GlobalMethodSecurityConfig.java    From Building-Web-Apps-with-Spring-5-and-Angular with MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #16
Source File: ResourceServerConfig.java    From java8-spring-cloud-microservice-demo with MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #17
Source File: OAuth2AutoConfigurationTests.java    From spring-security-oauth2-boot with Apache License 2.0 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
	return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #18
Source File: MethodSecurityConfig.java    From oauth2lab with MIT License 4 votes vote down vote up
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
Example #19
Source File: OAuth2ResourceServerConfig.java    From spring-boot with Apache License 2.0 2 votes vote down vote up
/**
 * 启用 #oauth2 表达式验证
 *
 * @return
 */
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}