本文整理汇总了Java中org.springframework.security.access.expression.SecurityExpressionHandler类的典型用法代码示例。如果您正苦于以下问题:Java SecurityExpressionHandler类的具体用法?Java SecurityExpressionHandler怎么用?Java SecurityExpressionHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SecurityExpressionHandler类属于org.springframework.security.access.expression包,在下文中一共展示了SecurityExpressionHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: postProcessBeforeInitialization
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
@Override
public Object postProcessBeforeInitialization(
Object bean, String beanName) throws BeansException {
if (bean instanceof SpringTemplateEngine) {
SpringTemplateEngine engine =
(SpringTemplateEngine) bean;
SecurityExpressionHandler<MethodInvocation> handler =
applicationContext.getBean(
SecurityExpressionHandler.class);
SecurityDialect dialect = new SecurityDialect(handler);
engine.addDialect(dialect);
}
return bean;
}
开发者ID:PacktPublishing,项目名称:Learning-Spring-Boot-2.0-Second-Edition,代码行数:15,代码来源:SecurityDialectPostProcessor.java
示例2: expressionHandler
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
/**
* Gets the {@link SecurityExpressionHandler} which is used for role hierarchy definition
*
* @return authenticationTokenFilter
*/
private SecurityExpressionHandler<FilterInvocation> expressionHandler() {
DefaultWebSecurityExpressionHandler defaultWebSecurityExpressionHandler = new DefaultWebSecurityExpressionHandler();
defaultWebSecurityExpressionHandler.setRoleHierarchy(roleHierarchy());
return defaultWebSecurityExpressionHandler;
}
示例3: afterPropertiesSet
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
@Override
public void afterPropertiesSet() throws Exception {
for (final SecurityExpressionHandler<?> handler : securityExpressionHandlers) {
Reflections.method("setDefaultRolePrefix")
.withParameterTypes(String.class)
.in(handler)
.invoke(DISABLED_ROLE_PREFIX);
}
}
示例4: SecurityExpressionObjectFactory
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
public SecurityExpressionObjectFactory(
SecurityExpressionHandler<MethodInvocation> handler) {
this.handler = handler;
}
开发者ID:PacktPublishing,项目名称:Learning-Spring-Boot-2.0-Second-Edition,代码行数:5,代码来源:SecurityExpressionObjectFactory.java
示例5: Authorization
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
public Authorization(ISpringWebFluxContext context,
SecurityExpressionHandler<MethodInvocation> handler) {
this.context = context;
this.handler = handler;
}
示例6: SecurityDialect
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
public SecurityDialect(
SecurityExpressionHandler<MethodInvocation> handler) {
super("Security Dialect");
this.handler = handler;
}
示例7: rbacWebSecurityExpressionHandler
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
@Bean
public SecurityExpressionHandler rbacWebSecurityExpressionHandler() {
return new RbacWebSecurityExpressionHandler();
}
示例8: webExpressionHandler
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
private SecurityExpressionHandler<FilterInvocation> webExpressionHandler() {
DefaultWebSecurityExpressionHandler defaultWebSecurityExpressionHandler = new DefaultWebSecurityExpressionHandler();
defaultWebSecurityExpressionHandler.setDefaultRolePrefix("");
return defaultWebSecurityExpressionHandler;
}
示例9: webSecurityExpressionHandler
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
@Bean
public SecurityExpressionHandler<FilterInvocation> webSecurityExpressionHandler(RoleHierarchy roleHierarchy) {
final DefaultWebSecurityExpressionHandler handler = new CustomWebSecurityExpressionHandler();
handler.setRoleHierarchy(roleHierarchy);
return handler;
}
示例10: webExpressionHandler
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
private SecurityExpressionHandler<FilterInvocation> webExpressionHandler() {
DefaultWebSecurityExpressionHandler defaultWebSecurityExpressionHandler = new DefaultWebSecurityExpressionHandler();
defaultWebSecurityExpressionHandler.setRoleHierarchy(roleHierarchy);
return defaultWebSecurityExpressionHandler;
}
示例11: webExpressionHandler
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
private SecurityExpressionHandler<FilterInvocation> webExpressionHandler() {
DefaultWebSecurityExpressionHandler defaultWebSecurityExpressionHandler = new DefaultWebSecurityExpressionHandler();
defaultWebSecurityExpressionHandler.setRoleHierarchy(roleHierarchy());
return defaultWebSecurityExpressionHandler;
}
示例12: setExpressionHandler
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
public void setExpressionHandler(
SecurityExpressionHandler<FilterInvocation> expressionHandler) {
this.expressionHandler = expressionHandler;
}
示例13: setExpressionHandler
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
public void setExpressionHandler(SecurityExpressionHandler<MethodInvocation> expressionHandler) {
this.expressionHandler = expressionHandler;
}
示例14: webExpressionHandler
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
private SecurityExpressionHandler<FilterInvocation> webExpressionHandler() {
DefaultWebSecurityExpressionHandler handler = new DefaultWebSecurityExpressionHandler();
handler.setRoleHierarchy(roleHierarchy());
return handler;
}
示例15: setExpressionHandler
import org.springframework.security.access.expression.SecurityExpressionHandler; //导入依赖的package包/类
public void setExpressionHandler(SecurityExpressionHandler<?> expressionHandler) {
this.expressionHandler = expressionHandler;
}
开发者ID:mateuszwenus,项目名称:spring-security-controller-auth,代码行数:4,代码来源:ExpressionBasedHandlerInvocationSecurityMetadataSource.java