Package io.camunda.security.auth
Record Class CamundaAuthentication
java.lang.Object
java.lang.Record
io.camunda.security.auth.CamundaAuthentication
- All Implemented Interfaces:
Serializable
public record CamundaAuthentication(String authenticatedUsername, String authenticatedClientId, List<String> authenticatedGroupIds, List<String> authenticatedRoleIds, List<String> authenticatedTenantIds, List<String> authenticatedMappingRuleIds, Map<String,Object> claims)
extends Record
implements Serializable
Represents the authentication context for a user or client in Camunda, including (where
appropriate) their username or client ID, group memberships, roles, tenants, mapping rules, and
associated claims.
Either authenticatedUsername or authenticatedClientId must be set, but not
both, unless the authentication represents an anonymous user in which case both can be null.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCamundaAuthentication(String authenticatedUsername, String authenticatedClientId, List<String> authenticatedGroupIds, List<String> authenticatedRoleIds, List<String> authenticatedTenantIds, List<String> authenticatedMappingRuleIds, Map<String, Object> claims) Creates an instance of aCamundaAuthenticationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CamundaAuthenticationReturns the value of theauthenticatedClientIdrecord component.Returns the value of theauthenticatedGroupIdsrecord component.Returns the value of theauthenticatedMappingRuleIdsrecord component.Returns the value of theauthenticatedRoleIdsrecord component.Returns the value of theauthenticatedTenantIdsrecord component.Returns the value of theauthenticatedUsernamerecord component.claims()Returns the value of theclaimsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanstatic CamundaAuthenticationnone()static CamundaAuthenticationof(Function<CamundaAuthentication.Builder, CamundaAuthentication.Builder> builderFunction) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CamundaAuthentication
public CamundaAuthentication(String authenticatedUsername, String authenticatedClientId, List<String> authenticatedGroupIds, List<String> authenticatedRoleIds, List<String> authenticatedTenantIds, List<String> authenticatedMappingRuleIds, Map<String, Object> claims) Creates an instance of aCamundaAuthenticationrecord class.- Parameters:
authenticatedUsername- the value for theauthenticatedUsernamerecord componentauthenticatedClientId- the value for theauthenticatedClientIdrecord componentauthenticatedGroupIds- the value for theauthenticatedGroupIdsrecord componentauthenticatedRoleIds- the value for theauthenticatedRoleIdsrecord componentauthenticatedTenantIds- the value for theauthenticatedTenantIdsrecord componentauthenticatedMappingRuleIds- the value for theauthenticatedMappingRuleIdsrecord componentclaims- the value for theclaimsrecord component
-
-
Method Details
-
isAnonymous
public boolean isAnonymous() -
none
-
anonymous
-
of
public static CamundaAuthentication of(Function<CamundaAuthentication.Builder, CamundaAuthentication.Builder> builderFunction) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
authenticatedUsername
Returns the value of theauthenticatedUsernamerecord component.- Returns:
- the value of the
authenticatedUsernamerecord component
-
authenticatedClientId
Returns the value of theauthenticatedClientIdrecord component.- Returns:
- the value of the
authenticatedClientIdrecord component
-
authenticatedGroupIds
Returns the value of theauthenticatedGroupIdsrecord component.- Returns:
- the value of the
authenticatedGroupIdsrecord component
-
authenticatedRoleIds
Returns the value of theauthenticatedRoleIdsrecord component.- Returns:
- the value of the
authenticatedRoleIdsrecord component
-
authenticatedTenantIds
Returns the value of theauthenticatedTenantIdsrecord component.- Returns:
- the value of the
authenticatedTenantIdsrecord component
-
authenticatedMappingRuleIds
Returns the value of theauthenticatedMappingRuleIdsrecord component.- Returns:
- the value of the
authenticatedMappingRuleIdsrecord component
-
claims
Returns the value of theclaimsrecord component.- Returns:
- the value of the
claimsrecord component
-