org.springframework.security.access.prepost.PostAuthorize.value()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.springframework.security.access.prepost.PostAuthorize.value()方法的一些代码示例,展示了PostAuthorize.value()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PostAuthorize.value()方法的具体详情如下:
包路径:org.springframework.security.access.prepost.PostAuthorize
类名称:PostAuthorize
方法名:value

PostAuthorize.value介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-security

String postFilterAttribute = postFilter == null ? null : postFilter.value();
String postAuthorizeAttribute = postAuthorize == null ? null : postAuthorize
    .value();

代码示例来源:origin: org.springframework.security/spring-security-core

String postFilterAttribute = postFilter == null ? null : postFilter.value();
String postAuthorizeAttribute = postAuthorize == null ? null : postAuthorize
    .value();

代码示例来源:origin: org.motechproject/motech-platform-web-security

@Override
  public void doWith(Method method) throws IllegalAccessException {
    Method methodOfOriginalClassIfProxied = findMethod(getTargetClass(bean), method.getName(), method.getParameterTypes());
    if (methodOfOriginalClassIfProxied != null) {
      PreAuthorize preAuthorize = findAnnotation(methodOfOriginalClassIfProxied, PreAuthorize.class);
      PostAuthorize postAuthorize = findAnnotation(methodOfOriginalClassIfProxied, PostAuthorize.class);
      List<String> annotations = new ArrayList<>(2);
      List<String> permissions = new ArrayList<>();
      if (preAuthorize != null) {
        annotations.add(preAuthorize.value());
      }
      if (postAuthorize != null) {
        annotations.add(postAuthorize.value());
      }
      for (String annotation : annotations) {
        SpelExpression expression = (SpelExpression) annotationParser.parseExpression(annotation);
        permissions.addAll(findPermissions(expression.getAST()));
      }
      addRoleAndPermissions(permissions);
    }
  }
});

代码示例来源:origin: apache/servicemix-bundles

String postFilterAttribute = postFilter == null ? null : postFilter.value();
String postAuthorizeAttribute = postAuthorize == null ? null : postAuthorize
    .value();

代码示例来源:origin: org.springframework.security/org.springframework.security.core

String preAuthorizeAttribute = preAuthorize == null ? null : preAuthorize.value();
String postFilterAttribute = postFilter == null ? null : postFilter.value();
String postAuthorizeAttribute = postAuthorize == null ? null : postAuthorize.value();

相关文章

微信公众号

最新文章

更多