Class SecurityAttributeStorage
java.lang.Object
cn.herodotus.engine.oauth2.authorization.processor.SecurityAttributeStorage
Description: SecurityAttribute 本地存储
- Author:
- : gengwei.zheng
- Date:
- : 2021/7/30 15:05
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToStorage(LinkedHashMap<HerodotusRequest, List<cn.herodotus.engine.core.identity.domain.HerodotusSecurityAttribute>> configAttributes, boolean isIndexable) 将权限数据添加至本地存储voidaddToStorage(LinkedHashMap<HerodotusRequest, List<cn.herodotus.engine.core.identity.domain.HerodotusSecurityAttribute>> matchers, LinkedHashMap<HerodotusRequest, List<cn.herodotus.engine.core.identity.domain.HerodotusSecurityAttribute>> configAttributes, boolean isIndexable) 将权限数据添加至本地存储,存储之前进行规则冲突校验LinkedHashMap<HerodotusRequest,List<cn.herodotus.engine.core.identity.domain.HerodotusSecurityAttribute>> 从 compatible 缓存中获取全部不需要路径匹配的(包含*号的url)请求权限映射MapList<cn.herodotus.engine.core.identity.domain.HerodotusSecurityAttribute>getConfigAttribute(String url, String method) 根据请求的 url 和 method 获取权限对象
-
Constructor Details
-
SecurityAttributeStorage
public SecurityAttributeStorage()
-
-
Method Details
-
getConfigAttribute
public List<cn.herodotus.engine.core.identity.domain.HerodotusSecurityAttribute> getConfigAttribute(String url, String method) 根据请求的 url 和 method 获取权限对象- Parameters:
url- 请求 URLmethod- 请求 method- Returns:
- 与请求url 和 method 匹配的权限数据,或者是空集合
-
getCompatible
public LinkedHashMap<HerodotusRequest,List<cn.herodotus.engine.core.identity.domain.HerodotusSecurityAttribute>> getCompatible()从 compatible 缓存中获取全部不需要路径匹配的(包含*号的url)请求权限映射Map- Returns:
- 如果缓存中存在,则返回请求权限映射Map集合,如果不存在则返回一个空的
LinkedHashMap
-
addToStorage
public void addToStorage(LinkedHashMap<HerodotusRequest, List<cn.herodotus.engine.core.identity.domain.HerodotusSecurityAttribute>> configAttributes, boolean isIndexable) 将权限数据添加至本地存储- Parameters:
configAttributes- 权限数据isIndexable- true 存入 indexable cache;false 存入 compatible cache
-
addToStorage
public void addToStorage(LinkedHashMap<HerodotusRequest, List<cn.herodotus.engine.core.identity.domain.HerodotusSecurityAttribute>> matchers, LinkedHashMap<HerodotusRequest, List<cn.herodotus.engine.core.identity.domain.HerodotusSecurityAttribute>> configAttributes, boolean isIndexable) 将权限数据添加至本地存储,存储之前进行规则冲突校验- Parameters:
matchers- 校验资源configAttributes- 权限数据isIndexable- true 存入 indexable cache;false 存入 compatible cache
-