当前位置: 首页>>代码示例>>Java>>正文


Java OAuth2MethodSecurityExpressionHandler类代码示例

本文整理汇总了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();
        }
    };
}
 
开发者ID:pivotal-cf,项目名称:identity-sample-apps,代码行数:10,代码来源:Application.java

示例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();
}
 
开发者ID:MinsxCloud,项目名称:minsx-framework,代码行数:5,代码来源:MethodSecurityConfig.java

示例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();
}
 
开发者ID:venus-boot,项目名称:saluki,代码行数:5,代码来源:WebSecurityConfiguration.java

示例9: createExpressionHandler

import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; //导入依赖的package包/类
@Override
 protected MethodSecurityExpressionHandler createExpressionHandler() {
    return new OAuth2MethodSecurityExpressionHandler();
}
 
开发者ID:arunsoman,项目名称:spring-micro-service-jwt,代码行数:5,代码来源:GlobalMethodSecurityConfig.java


注:本文中的org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。