Package io.jmix.security.impl.constraint
Class AuthenticationPolicyStore
java.lang.Object
io.jmix.security.impl.constraint.AuthenticationPolicyStore
- All Implemented Interfaces:
PolicyStore
@Component("sec_AuthenticationPolicyStore")
public class AuthenticationPolicyStore
extends Object
implements PolicyStore
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentAuthentication
protected ExtendedEntities
protected ResourceRoleRepository
protected RoleGrantedAuthorityUtils
protected RowLevelRoleRepository
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Stream<ResourcePolicy>
extractResourcePoliciesFromAuthenticationByScope
(Function<ResourceRole, Stream<ResourcePolicy>> extractor) protected Stream<RowLevelPolicy>
getEntityAttributesResourcePolicies
(MetaClass metaClass, String attribute) getEntityAttributesResourcePoliciesByWildcard
(String entityWildcard, String attributeWildcard) getEntityResourcePolicies
(MetaClass metaClass) getEntityResourcePoliciesByWildcard
(String wildcard) getGraphQLResourcePolicies
(String resourceName) protected Stream<ResourcePolicy>
getPoliciesStreamByTypeAndResources
(ResourceRole resourceRole, String policyType, Collection<String> resources) getRowLevelPolicies
(MetaClass metaClass) protected String
getScope
(org.springframework.security.core.Authentication authentication) getSpecificResourcePolicies
(String resourceName) protected boolean
isAppliedForScope
(ResourceRole resourceRole, String scope)
-
Field Details
-
currentAuthentication
-
extendedEntities
-
resourceRoleRepository
-
rowLevelRoleRepository
-
roleGrantedAuthorityUtils
-
-
Constructor Details
-
AuthenticationPolicyStore
public AuthenticationPolicyStore()
-
-
Method Details
-
getRowLevelPolicies
- Specified by:
getRowLevelPolicies
in interfacePolicyStore
-
getEntityResourcePolicies
- Specified by:
getEntityResourcePolicies
in interfacePolicyStore
-
getEntityResourcePoliciesByWildcard
- Specified by:
getEntityResourcePoliciesByWildcard
in interfacePolicyStore
-
getEntityAttributesResourcePolicies
public Stream<ResourcePolicy> getEntityAttributesResourcePolicies(MetaClass metaClass, String attribute) - Specified by:
getEntityAttributesResourcePolicies
in interfacePolicyStore
-
getEntityAttributesResourcePoliciesByWildcard
public Stream<ResourcePolicy> getEntityAttributesResourcePoliciesByWildcard(String entityWildcard, String attributeWildcard) - Specified by:
getEntityAttributesResourcePoliciesByWildcard
in interfacePolicyStore
-
getSpecificResourcePolicies
- Specified by:
getSpecificResourcePolicies
in interfacePolicyStore
-
getGraphQLResourcePolicies
- Specified by:
getGraphQLResourcePolicies
in interfacePolicyStore
-
extractResourcePoliciesFromAuthenticationByScope
protected Stream<ResourcePolicy> extractResourcePoliciesFromAuthenticationByScope(Function<ResourceRole, Stream<ResourcePolicy>> extractor) -
extractRowLevelPoliciesFromAuthentication
protected Stream<RowLevelPolicy> extractRowLevelPoliciesFromAuthentication(Function<RowLevelRole, Stream<RowLevelPolicy>> extractor) -
getScope
@Nullable protected String getScope(org.springframework.security.core.Authentication authentication) -
isAppliedForScope
-
getPoliciesStreamByTypeAndResources
protected Stream<ResourcePolicy> getPoliciesStreamByTypeAndResources(ResourceRole resourceRole, String policyType, Collection<String> resources)
-