Record Class OidcClient.TokenResponse

java.lang.Object
java.lang.Record
io.fluxzero.idp.client.OidcClient.TokenResponse
Record Components:
idToken - ID token intended for the configured client id
accessToken - access token intended for the configured resource audience
tokenType - token type, normally Bearer
expiresIn - lifetime reported by the tenant in seconds
scope - scopes granted by the tenant
json - complete response payload for applications that need provider-specific fields
Enclosing class:
OidcClient

public static record OidcClient.TokenResponse(String idToken, String accessToken, String tokenType, long expiresIn, String scope, com.fasterxml.jackson.databind.JsonNode json) extends Record
Raw token response returned by an OIDC tenant.
  • Constructor Details

    • TokenResponse

      public TokenResponse(String idToken, String accessToken, String tokenType, long expiresIn, String scope, com.fasterxml.jackson.databind.JsonNode json)
      Creates an instance of a TokenResponse record class.
      Parameters:
      idToken - the value for the idToken record component
      accessToken - the value for the accessToken record component
      tokenType - the value for the tokenType record component
      expiresIn - the value for the expiresIn record component
      scope - the value for the scope record component
      json - the value for the json record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • idToken

      public String idToken()
      Returns the value of the idToken record component.
      Returns:
      the value of the idToken record component
    • accessToken

      public String accessToken()
      Returns the value of the accessToken record component.
      Returns:
      the value of the accessToken record component
    • tokenType

      public String tokenType()
      Returns the value of the tokenType record component.
      Returns:
      the value of the tokenType record component
    • expiresIn

      public long expiresIn()
      Returns the value of the expiresIn record component.
      Returns:
      the value of the expiresIn record component
    • scope

      public String scope()
      Returns the value of the scope record component.
      Returns:
      the value of the scope record component
    • json

      public com.fasterxml.jackson.databind.JsonNode json()
      Returns the value of the json record component.
      Returns:
      the value of the json record component