类 SecurityMetadataSourceStorage

java.lang.Object
cn.herodotus.engine.oauth2.authorization.storage.SecurityMetadataSourceStorage

public class SecurityMetadataSourceStorage extends Object

Description: SecurityMetadata 本地存储

作者:
: gengwei.zheng
Date:
: 2021/7/30 15:05
  • 构造器详细资料

    • SecurityMetadataSourceStorage

      public SecurityMetadataSourceStorage()
  • 方法详细资料

    • getConfigAttribute

      public HerodotusConfigAttribute getConfigAttribute(String url, String method)
      根据请求的 url 和 method 获取权限对象
      参数:
      url - 请求 URL
      method - 请求 method
      返回:
      与请求url 和 method 匹配的权限数据,或者是空集合
    • getCompatible

      从 compatible 缓存中获取全部不需要路径匹配的(包含*号的url)请求权限映射Map
      返回:
      如果缓存中存在,则返回请求权限映射Map集合,如果不存在则返回一个空的LinkedHashMap
    • addToStorage

      public void addToStorage(LinkedHashMap<HerodotusRequest,HerodotusConfigAttribute> securityMetadata, boolean isIndexable)
      将权限数据添加至本地存储
      参数:
      securityMetadata - 权限数据
      isIndexable - true 存入 indexable cache;false 存入 compatible cache
    • addToStorage

      public void addToStorage(LinkedHashMap<HerodotusRequest,HerodotusConfigAttribute> matchers, LinkedHashMap<HerodotusRequest,HerodotusConfigAttribute> securityMetadata, boolean isIndexable)
      将权限数据添加至本地存储,存储之前进行规则冲突校验
      参数:
      matchers - 校验资源
      securityMetadata - 权限数据
      isIndexable - true 存入 indexable cache;false 存入 compatible cache