Interface AccessToken
-
public interface AccessToken
The Access Token is used by an application to access protected resources.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AccessToken.Type
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getClaim(java.lang.String key)
java.util.Map<java.lang.String,java.lang.Object>
getClaims()
java.lang.Long
getExpirationTime()
Optional.JwtClaims
getJwtClaims()
Access token's claimsScope
getScope()
Optional.java.lang.String
getToken()
AccessToken.Type
getType()
boolean
isExpired()
Checks if the Access Token is expired, taking into account the min validity time configured by the user.boolean
isJWT()
Signify, if access token is JWT based, or opaque.
-
-
-
Method Detail
-
getToken
java.lang.String getToken()
- Returns:
- The access token
-
isJWT
boolean isJWT()
Signify, if access token is JWT based, or opaque.- Returns:
- true if access token is JWT token.
-
getJwtClaims
JwtClaims getJwtClaims()
Access token's claims- Returns:
- access token claims if it is a JWT Token,
JwtClaims.NONE
otherwise.
-
getClaims
java.util.Map<java.lang.String,java.lang.Object> getClaims()
- Returns:
- the access token's claims that was received from the OpenId Connect provider
-
getClaim
java.lang.Object getClaim(java.lang.String key)
- Parameters:
key
- the claim key- Returns:
- the identity token's claim based on requested key type or null if not provided
-
getExpirationTime
java.lang.Long getExpirationTime()
Optional. Expiration time of the Access Token in seconds since the response was generated.- Returns:
- the expiration time of the Access Token or null if expiration time is not known
-
isExpired
boolean isExpired()
Checks if the Access Token is expired, taking into account the min validity time configured by the user.- Returns:
true
, if access token is expired or it will be expired in the next X milliseconds configured by user.
-
getScope
Scope getScope()
Optional. Scope of the Access Token.- Returns:
- the scope of the Access Token
-
getType
AccessToken.Type getType()
- Returns:
- the Type of the Access Token
-
-