public class FlowableAuthenticationSecurityScope extends Object implements SecurityScope
Modifier and Type | Field and Description |
---|---|
protected Authentication |
authentication |
Constructor and Description |
---|
FlowableAuthenticationSecurityScope(Authentication authentication) |
Modifier and Type | Method and Description |
---|---|
protected Stream<String> |
extractAuthoritiesStartingWith(String prefix) |
Set<String> |
getGroupKeys()
The group keys for which the security scope is meant for
|
SecurityScope |
getImpersonationScope()
Return the
SecurityScope for the user doing the impersonation. |
String |
getTenantId()
The tenant id for which the security scope is meant for
|
String |
getUserDefinitionKey()
The user definition key for which the security scope is meant for
|
String |
getUserId()
The id of the user for which the security scope is meant for
|
boolean |
hasAuthority(String authority)
Check if the security scope has the given authority.
|
protected final Authentication authentication
public FlowableAuthenticationSecurityScope(Authentication authentication)
public String getUserId()
SecurityScope
getUserId
in interface SecurityScope
public Set<String> getGroupKeys()
SecurityScope
getGroupKeys
in interface SecurityScope
public String getTenantId()
SecurityScope
getTenantId
in interface SecurityScope
public String getUserDefinitionKey()
SecurityScope
getUserDefinitionKey
in interface SecurityScope
public boolean hasAuthority(String authority)
SecurityScope
hasAuthority
in interface SecurityScope
authority
- the authority to be checkedtrue
if the security scope has the given authority, false
otherwisepublic SecurityScope getImpersonationScope()
SecurityScope
SecurityScope
for the user doing the impersonation.
If no impersonation is happenning then return null
getImpersonationScope
in interface SecurityScope
null