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)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddScopesItem(String scopesItem) booleanstatic IntrospectResponseCreate an instance of IntrospectResponse given an JSON stringWhether the token is currently active (not expired, not revoked)getAud()Audience (target service)Client ID for application tokens.getExp()Expiration time (Unix timestamp)getIat()Issued at time (Unix timestamp)getIss()Issuer (authentication service URL)Scopes carried by an active access token.getSub()Subject (user or application UUID)Type of token (access_token or refresh_token)Username (email) for user tokens.inthashCode()voidvoidvoidsetClientId(String clientId) voidvoidvoidvoidvoidvoidsetTokenType(String tokenType) voidsetUsername(String username) toJson()Convert an instance of IntrospectResponse to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundstatic voidvalidateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) Validates the JSON Element as a candidate of a oneOf schema: the checks ofvalidateJsonElement(JsonElement), and the element carries no member this model does not declare.
-
Field Details
-
SERIALIZED_NAME_ACTIVE
- See Also:
-
SERIALIZED_NAME_SCOPES
- See Also:
-
SERIALIZED_NAME_USERNAME
- See Also:
-
SERIALIZED_NAME_EXP
- See Also:
-
SERIALIZED_NAME_IAT
- See Also:
-
SERIALIZED_NAME_SUB
- See Also:
-
SERIALIZED_NAME_AUD
- See Also:
-
SERIALIZED_NAME_ISS
- See Also:
-
SERIALIZED_NAME_CLIENT_ID
- See Also:
-
SERIALIZED_NAME_TOKEN_TYPE
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
IntrospectResponse
public IntrospectResponse()
-
-
Method Details
-
active
-
getActive
Whether the token is currently active (not expired, not revoked)- Returns:
- active
-
setActive
-
scopes
-
addScopesItem
-
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
-
username
-
getUsername
Username (email) for user tokens. OMITTED (not null) for application tokens - the response omits members that have no value- Returns:
- username
-
setUsername
-
exp
-
getExp
Expiration time (Unix timestamp)- Returns:
- exp
-
setExp
-
iat
-
getIat
Issued at time (Unix timestamp)- Returns:
- iat
-
setIat
-
sub
-
getSub
Subject (user or application UUID)- Returns:
- sub
-
setSub
-
aud
-
getAud
Audience (target service)- Returns:
- aud
-
setAud
-
iss
-
getIss
Issuer (authentication service URL)- Returns:
- iss
-
setIss
-
clientId
-
getClientId
Client ID for application tokens. OMITTED (not null) for user tokens - the response omits members that have no value- Returns:
- clientId
-
setClientId
-
tokenType
-
getTokenType
Type of token (access_token or refresh_token)- Returns:
- tokenType
-
setTokenType
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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 ofvalidateJsonElement(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
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
Convert an instance of IntrospectResponse to an JSON string- Returns:
- JSON string
-