java.lang.Object
io.automatiko.engine.api.auth.TrustedIdentityProvider
- All Implemented Interfaces:
IdentityProvider
Trusted identity provider is intended to be used by system wide operations
that might not have any security context attached e.g. timer expiration,
messaging consumers etc.
Trusted identity is considered an admin so it can perform any operation
-
Field Summary
Fields inherited from interface io.automatiko.engine.api.auth.IdentityProvider
current, UNKNOWN_USER_IDENTITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns name assigned to the current context, usually refers to user namegetRoles()Returns roles assigned to the current context if anybooleanChecks if given role is assigned to current contextbooleanisAdmin()Checks if given identity is an adminReturns map of additional properties that can be consumed byAccessPolicyimplementationstoString()
-
Constructor Details
-
TrustedIdentityProvider
-
-
Method Details
-
isAdmin
public boolean isAdmin()Description copied from interface:IdentityProviderChecks if given identity is an admin- Specified by:
isAdminin interfaceIdentityProvider- Returns:
- returns true if the identity has admin rights otherwise false
-
getName
Description copied from interface:IdentityProviderReturns name assigned to the current context, usually refers to user name- Specified by:
getNamein interfaceIdentityProvider- Returns:
- assigned name taken from security context
-
getRoles
Description copied from interface:IdentityProviderReturns roles assigned to the current context if any- Specified by:
getRolesin interfaceIdentityProvider- Returns:
- list of assigned roles or empty list
-
hasRole
Description copied from interface:IdentityProviderChecks if given role is assigned to current context- Specified by:
hasRolein interfaceIdentityProvider- Parameters:
role- role to be checked- Returns:
- true if the role is found otherwise null
-
toString
-
properties
Description copied from interface:IdentityProviderReturns map of additional properties that can be consumed byAccessPolicyimplementations- Specified by:
propertiesin interfaceIdentityProvider- Returns:
- non null map of properties
-