Record Class OidcUser
java.lang.Object
java.lang.Record
io.fluxzero.sdk.tracking.handling.authentication.OidcUser
- Record Components:
subject- stable subject identifier from thesubclaimemail- optional email addresstenantId- optional Fluxzero tenant identifier from thetenant_idclaimdisplayName- optional display name from thenameclaimroles- resolved roles and scopes; always includesauthenticatedclaims- raw userinfo claims
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a raw claim by name, ornullwhen the claim is absent.claims()Returns the value of theclaimsrecord component.Returns the value of thedisplayNamerecord component.email()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.getName()final inthashCode()Returns a hash code value for this object.booleanIndicates whether this user has the specified role.roles()Returns the value of therolesrecord component.subject()Returns the value of thesubjectrecord component.tenantId()Returns the value of thetenantIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OidcUser
public OidcUser(String subject, String email, String tenantId, String displayName, Set<String> roles, Map<String, Object> claims) Creates an instance of aOidcUserrecord class.- Parameters:
subject- the value for thesubjectrecord componentemail- the value for theemailrecord componenttenantId- the value for thetenantIdrecord componentdisplayName- the value for thedisplayNamerecord componentroles- the value for therolesrecord componentclaims- the value for theclaimsrecord component
-
-
Method Details
-
getName
-
hasRole
-
claim
-
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
-
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). -
subject
-
email
-
tenantId
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
roles
-
claims
-