Record Class SecurityPrincipal
java.lang.Object
java.lang.Record
zeroecho.pki.server.SecurityPrincipal
- Record Components:
principalId- canonical stable principal identitytype- closed principal typedisplayName- safe administrative display labelorganization- optional canonical owner/organization relationshipattributes- finite safe relationship attributesenabled- whether authorization assignments may be considered
public record SecurityPrincipal(String principalId, SecurityPrincipal.Type type, String displayName, Optional<String> organization, Map<String,String> attributes, boolean enabled)
extends Record
Transport-independent authenticated-identity target used by authorization.
Authentication credentials and secrets are deliberately excluded.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSecurityPrincipal(String principalId, SecurityPrincipal.Type type, String displayName, Optional<String> organization, Map<String, String> attributes, boolean enabled) Validates and snapshots finite safe principal metadata. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.Returns the value of thedisplayNamerecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theorganizationrecord component.Returns the value of theprincipalIdrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
SecurityPrincipal
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
principalId
Returns the value of theprincipalIdrecord component.- Returns:
- the value of the
principalIdrecord component
-
type
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
organization
Returns the value of theorganizationrecord component.- Returns:
- the value of the
organizationrecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
enabled
-