Record Class JwtClaims
java.lang.Object
java.lang.Record
io.fluxzero.idp.client.JwtClaims
- Record Components:
issuer- issuer that signed the tokensubject- stable OIDC subjectaudiences- token audiencesissuedAt- token issued-at timestampnotBefore- token not-before timestampexpiresAt- token expiration timestamptokenUse- Fluxzero token use, for exampleidoraccesstenantId- Fluxzero tenant id claim when presentname- display name when presentemail- email address when presentjson- complete JWT payload
public record JwtClaims(String issuer, String subject, List<String> audiences, Instant issuedAt, Instant notBefore, Instant expiresAt, String tokenUse, String tenantId, String name, String email, com.fasterxml.jackson.databind.JsonNode json)
extends Record
Normalized claims extracted from a validated OIDC JWT.
This type is intentionally small and provider-neutral. Applications can use the common fields for their normal domain mapping and still access the raw JSON for tenant-specific claims when needed.
-
Constructor Summary
ConstructorsConstructorDescriptionJwtClaims(String issuer, String subject, List<String> audiences, Instant issuedAt, Instant notBefore, Instant expiresAt, String tokenUse, String tenantId, String name, String email, com.fasterxml.jackson.databind.JsonNode json) Creates an instance of aJwtClaimsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaudiencesrecord component.Returns a string claim from the raw payload.email()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.final inthashCode()Returns a hash code value for this object.issuedAt()Returns the value of theissuedAtrecord component.issuer()Returns the value of theissuerrecord component.com.fasterxml.jackson.databind.JsonNodejson()Returns the value of thejsonrecord component.name()Returns the value of thenamerecord component.Returns the value of thenotBeforerecord component.subject()Returns the value of thesubjectrecord component.tenantId()Returns the value of thetenantIdrecord component.tokenUse()Returns the value of thetokenUserecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JwtClaims
public JwtClaims(String issuer, String subject, List<String> audiences, Instant issuedAt, Instant notBefore, Instant expiresAt, String tokenUse, String tenantId, String name, String email, com.fasterxml.jackson.databind.JsonNode json) Creates an instance of aJwtClaimsrecord class.- Parameters:
issuer- the value for theissuerrecord componentsubject- the value for thesubjectrecord componentaudiences- the value for theaudiencesrecord componentissuedAt- the value for theissuedAtrecord componentnotBefore- the value for thenotBeforerecord componentexpiresAt- the value for theexpiresAtrecord componenttokenUse- the value for thetokenUserecord componenttenantId- the value for thetenantIdrecord componentname- the value for thenamerecord componentemail- the value for theemailrecord componentjson- the value for thejsonrecord component
-
-
Method Details
-
claim
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
issuer
-
subject
-
audiences
-
issuedAt
-
notBefore
-
expiresAt
-
tokenUse
-
tenantId
-
name
-
email
-
json
-