Class IntrospectResponse

java.lang.Object
co.ankatech.keymanagement.client.auth.model.IntrospectResponse

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class IntrospectResponse extends Object
OAuth 2.0 token introspection response (RFC 7662)
  • Field Details

  • Constructor Details

    • IntrospectResponse

      public IntrospectResponse()
  • Method Details

    • active

      public IntrospectResponse active(@Nonnull Boolean active)
    • getActive

      @Nonnull public Boolean getActive()
      Whether the token is currently active (not expired, not revoked)
      Returns:
      active
    • setActive

      public void setActive(@Nonnull Boolean active)
    • scopes

      public IntrospectResponse scopes(@Nullable List<String> scopes)
    • addScopesItem

      public IntrospectResponse addScopesItem(String scopesItem)
    • getScopes

      @Nullable public List<String> getScopes()
      Scopes carried by an active access token. OMITTED for a refresh token - a refresh token grants no scopes of its own, and reporting the scopes of the access token it could mint would describe a token that does not exist yet
      Returns:
      scopes
    • setScopes

      public void setScopes(@Nullable List<String> scopes)
    • username

      public IntrospectResponse username(@Nullable String username)
    • getUsername

      @Nullable public String getUsername()
      Username (email) for user tokens. OMITTED (not null) for application tokens - the response omits members that have no value
      Returns:
      username
    • setUsername

      public void setUsername(@Nullable String username)
    • exp

      public IntrospectResponse exp(@Nullable Long exp)
    • getExp

      @Nullable public Long getExp()
      Expiration time (Unix timestamp)
      Returns:
      exp
    • setExp

      public void setExp(@Nullable Long exp)
    • iat

      public IntrospectResponse iat(@Nullable Long iat)
    • getIat

      @Nullable public Long getIat()
      Issued at time (Unix timestamp)
      Returns:
      iat
    • setIat

      public void setIat(@Nullable Long iat)
    • sub

      public IntrospectResponse sub(@Nullable String sub)
    • getSub

      @Nullable public String getSub()
      Subject (user or application UUID)
      Returns:
      sub
    • setSub

      public void setSub(@Nullable String sub)
    • aud

      public IntrospectResponse aud(@Nullable String aud)
    • getAud

      @Nullable public String getAud()
      Audience (target service)
      Returns:
      aud
    • setAud

      public void setAud(@Nullable String aud)
    • iss

      public IntrospectResponse iss(@Nullable String iss)
    • getIss

      @Nullable public String getIss()
      Issuer (authentication service URL)
      Returns:
      iss
    • setIss

      public void setIss(@Nullable String iss)
    • clientId

      public IntrospectResponse clientId(@Nullable String clientId)
    • getClientId

      @Nullable public String getClientId()
      Client ID for application tokens. OMITTED (not null) for user tokens - the response omits members that have no value
      Returns:
      clientId
    • setClientId

      public void setClientId(@Nullable String clientId)
    • tokenType

      public IntrospectResponse tokenType(@Nullable String tokenType)
    • getTokenType

      @Nullable public String getTokenType()
      Type of token (access_token or refresh_token)
      Returns:
      tokenType
    • setTokenType

      public void setTokenType(@Nullable String tokenType)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to IntrospectResponse
    • validateJsonElementAsCandidate

      public static void validateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element as a candidate of a oneOf schema: the checks of validateJsonElement(JsonElement), and the element carries no member this model does not declare. A oneOf schema without a discriminator tells its candidates apart by their member sets, so a candidate is matched on its closed member set.
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is not a IntrospectResponse
    • fromJson

      public static IntrospectResponse fromJson(String jsonString) throws IOException
      Create an instance of IntrospectResponse given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of IntrospectResponse
      Throws:
      IOException - if the JSON string is invalid with respect to IntrospectResponse
    • toJson

      public String toJson()
      Convert an instance of IntrospectResponse to an JSON string
      Returns:
      JSON string