Class FlowableAuthenticationSecurityScope
- java.lang.Object
-
- com.flowable.core.spring.security.FlowableAuthenticationSecurityScope
-
- All Implemented Interfaces:
SecurityScope
public class FlowableAuthenticationSecurityScope extends java.lang.Object implements SecurityScope
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.security.core.Authentication
authentication
-
Constructor Summary
Constructors Constructor Description FlowableAuthenticationSecurityScope(org.springframework.security.core.Authentication authentication)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.stream.Stream<java.lang.String>
extractAuthoritiesStartingWith(java.lang.String prefix)
java.util.Set<java.lang.String>
getGroupKeys()
The group keys for which the security scope is meant forSecurityScope
getImpersonationScope()
Return theSecurityScope
for the user doing the impersonation.java.lang.String
getTenantId()
The tenant id for which the security scope is meant forjava.lang.String
getUserDefinitionKey()
The user definition key for which the security scope is meant forjava.lang.String
getUserId()
The id of the user for which the security scope is meant forboolean
hasAuthority(java.lang.String authority)
Check if the security scope has the given authority.
-
-
-
Method Detail
-
getUserId
public java.lang.String getUserId()
Description copied from interface:SecurityScope
The id of the user for which the security scope is meant for- Specified by:
getUserId
in interfaceSecurityScope
- Returns:
- the user id
-
getGroupKeys
public java.util.Set<java.lang.String> getGroupKeys()
Description copied from interface:SecurityScope
The group keys for which the security scope is meant for- Specified by:
getGroupKeys
in interfaceSecurityScope
- Returns:
- the group keys
-
getTenantId
public java.lang.String getTenantId()
Description copied from interface:SecurityScope
The tenant id for which the security scope is meant for- Specified by:
getTenantId
in interfaceSecurityScope
- Returns:
- the tenant id
-
getUserDefinitionKey
public java.lang.String getUserDefinitionKey()
Description copied from interface:SecurityScope
The user definition key for which the security scope is meant for- Specified by:
getUserDefinitionKey
in interfaceSecurityScope
- Returns:
- the user definition key
-
hasAuthority
public boolean hasAuthority(java.lang.String authority)
Description copied from interface:SecurityScope
Check if the security scope has the given authority.- Specified by:
hasAuthority
in interfaceSecurityScope
- Parameters:
authority
- the authority to be checked- Returns:
true
if the security scope has the given authority,false
otherwise
-
getImpersonationScope
public SecurityScope getImpersonationScope()
Description copied from interface:SecurityScope
Return theSecurityScope
for the user doing the impersonation. If no impersonation is happenning then returnnull
- Specified by:
getImpersonationScope
in interfaceSecurityScope
- Returns:
- the security scope of the user doing the impersonation or
null
-
extractAuthoritiesStartingWith
protected java.util.stream.Stream<java.lang.String> extractAuthoritiesStartingWith(java.lang.String prefix)
-
-