本文整理汇总了Java中org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler类的典型用法代码示例。如果您正苦于以下问题:Java OAuth2MethodSecurityExpressionHandler类的具体用法?Java OAuth2MethodSecurityExpressionHandler怎么用?Java OAuth2MethodSecurityExpressionHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OAuth2MethodSecurityExpressionHandler类属于org.springframework.security.oauth2.provider.expression包,在下文中一共展示了OAuth2MethodSecurityExpressionHandler类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getExpressionHandler
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; //导入依赖的package包/类
private OAuth2MethodSecurityExpressionHandler getExpressionHandler(
DefaultMethodSecurityExpressionHandler bean) {
OAuth2MethodSecurityExpressionHandler handler = new OAuth2MethodSecurityExpressionHandler();
handler.setApplicationContext(this.applicationContext);
AuthenticationTrustResolver trustResolver = findInContext(
AuthenticationTrustResolver.class);
if (trustResolver != null) {
handler.setTrustResolver(trustResolver);
}
PermissionEvaluator permissions = findInContext(PermissionEvaluator.class);
if (permissions != null) {
handler.setPermissionEvaluator(permissions);
}
handler.setExpressionParser(bean.getExpressionParser());
return handler;
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:17,代码来源:OAuth2MethodSecurityConfiguration.java
示例2: postProcessAfterInitialization
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; //导入依赖的package包/类
@Override
public Object postProcessAfterInitialization(Object bean, String beanName)
throws BeansException {
if (bean instanceof DefaultMethodSecurityExpressionHandler
&& !(bean instanceof OAuth2MethodSecurityExpressionHandler)) {
return getExpressionHandler(
(DefaultMethodSecurityExpressionHandler) bean);
}
return bean;
}
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:11,代码来源:OAuth2MethodSecurityConfiguration.java
示例3: getExpressionHandler
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; //导入依赖的package包/类
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;
}
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:13,代码来源:OAuth2MethodSecurityConfiguration.java
示例4: globalMethodSecurityConfiguration
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; //导入依赖的package包/类
@Bean
public GlobalMethodSecurityConfiguration globalMethodSecurityConfiguration() {
return new GlobalMethodSecurityConfiguration() {
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
return new OAuth2MethodSecurityExpressionHandler();
}
};
}
示例5: createExpressionHandler
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; //导入依赖的package包/类
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
return new OAuth2MethodSecurityExpressionHandler();
}
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:5,代码来源:OAuth2AutoConfigurationTests.java
示例6: createExpressionHandler
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; //导入依赖的package包/类
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
return new OAuth2MethodSecurityExpressionHandler();
}
示例7: createExpressionHandler
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; //导入依赖的package包/类
/**
* Customize the MethodSecurityExpressionHandler so we can use the SPEL
* variable 'oauth2' with security annotations like @PreAuthorize
*/
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
return new OAuth2MethodSecurityExpressionHandler();
}
开发者ID:dserradji,项目名称:reactive-customer-service,代码行数:9,代码来源:OAuth2GlobalMethodSecurityConfiguration.java
示例8: createExpressionHandler
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; //导入依赖的package包/类
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
return new OAuth2MethodSecurityExpressionHandler();
}
示例9: createExpressionHandler
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; //导入依赖的package包/类
@Override
protected MethodSecurityExpressionHandler createExpressionHandler() {
return new OAuth2MethodSecurityExpressionHandler();
}