Top Description Inners Methods
jakarta.security.enterprise.identitystore.openid

public Interface AccessToken

Imports
java.util.Map

The Access Token is used by an application to access protected resources.
Authors
jGauravGupta, Rudy De Busscher

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the identity token's claim based on requested key type or null if not provided
getClaim
(String
the claim key
key
)

public Map<String, Object>

Returns:

the access token's claims that was received from the OpenId Connect provider
getClaims
()

public Long

Returns:

the expiration time of the Access Token or null if expiration time is not known
getExpirationTime
()

Optional.

public JwtClaims

Returns:

access token claims if it is a JWT Token, JwtClaims#NONE otherwise.
getJwtClaims
()

Access token's claims

public Scope

Returns:

the scope of the Access Token
getScope
()

Optional.

public String

Returns:

The access token
getToken
()

public AccessToken.Type

Returns:

the Type of the Access Token
getType
()

public boolean

Returns:

true, if access token is expired or it will be expired in the next X milliseconds configured by user.
isExpired
()

Checks if the Access Token is expired, taking into account the min validity time configured by the user.

public boolean

Returns:

true if access token is JWT token.
isJWT
()

Signify, if access token is JWT based, or opaque.

Method Detail

getClaimback to summary
public Object getClaim(String key)
Parameters
key:String

the claim key

Returns:Object

the identity token's claim based on requested key type or null if not provided

getClaimsback to summary
public Map<String, Object> getClaims()
Returns:Map<String, Object>

the access token's claims that was received from the OpenId Connect provider

getExpirationTimeback to summary
public Long getExpirationTime()

Optional. Expiration time of the Access Token in seconds since the response was generated.

Returns:Long

the expiration time of the Access Token or null if expiration time is not known

getJwtClaimsback to summary
public JwtClaims getJwtClaims()

Access token's claims

Returns:JwtClaims

access token claims if it is a JWT Token, JwtClaims#NONE otherwise.

getScopeback to summary
public Scope getScope()

Optional. Scope of the Access Token.

Returns:Scope

the scope of the Access Token

getTokenback to summary
public String getToken()
Returns:String

The access token

getTypeback to summary
public AccessToken.Type getType()
Returns:AccessToken.Type

the Type of the Access Token

isExpiredback to summary
public boolean isExpired()

Checks if the Access Token is expired, taking into account the min validity time configured by the user.

Returns:boolean

true, if access token is expired or it will be expired in the next X milliseconds configured by user.

isJWTback to summary
public boolean isJWT()

Signify, if access token is JWT based, or opaque.

Returns:boolean

true if access token is JWT token.

jakarta.security.enterprise.identitystore.openid back to summary

public final Enum AccessToken.Type

extends Enum<AccessToken.Type>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final AccessToken.Type
public static final AccessToken.Type

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static AccessToken.Type
public static AccessToken.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BEARERback to summary
public static final AccessToken.Type BEARER
MACback to summary
public static final AccessToken.Type MAC

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static AccessToken.Type valueOf(String name)
valuesback to summary
public static AccessToken.Type[] values()