Package org.forgerock.oauth2.core
Interface IntrospectableToken
-
- All Superinterfaces:
Token
- All Known Subinterfaces:
AccessToken
- All Known Implementing Classes:
MacaroonToken
@SupportedAll public interface IntrospectableToken extends Token
An OAuth 2.0 token abstraction for introspection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Integer
getAuthLevel()
Gets the session auth level.long
getAuthTimeSeconds()
Gets the end user's authentication time in seconds.String
getClientId()
Gets the token's client id.default Map<String,Object>
getCustomFields()
Gets the custom fields added to the token.long
getExpiryTime()
Gets the token's expiry time.String
getGrantType()
Gets the grant type that was used to produce the token.String
getRealm()
Gets the token's realm.default org.forgerock.oauth2.core.ResourceOwner
getResourceOwner()
It turns instance of IntrospectableToken into ResourceOwner.String
getResourceOwnerId()
Gets the token's resource owner id.Set<String>
getScope()
Gets the token's scopes.boolean
isExpired()
Gets whether the token has expired.-
Methods inherited from interface org.forgerock.oauth2.core.Token
getAuditTrackingId, getTokenId, getTokenInfo, getTokenName, toJsonValue, toMap
-
-
-
-
Method Detail
-
getExpiryTime
long getExpiryTime()
Gets the token's expiry time.- Returns:
- The token's expiry time.
-
isExpired
boolean isExpired()
Gets whether the token has expired.- Returns:
- Whether the token has expired.
-
getRealm
String getRealm()
Gets the token's realm.- Returns:
- The token's realm.
-
getClientId
String getClientId()
Gets the token's client id.- Returns:
- The token's client id.
-
getResourceOwnerId
String getResourceOwnerId()
Gets the token's resource owner id.- Returns:
- The token's resource owner id.
-
getAuthTimeSeconds
long getAuthTimeSeconds()
Gets the end user's authentication time in seconds.- Returns:
- The authentication time.
-
getAuthLevel
Integer getAuthLevel()
Gets the session auth level.- Returns:
- The session auth level.
-
getGrantType
String getGrantType()
Gets the grant type that was used to produce the token.- Returns:
- The grant type or null if grant type was not set.
-
getResourceOwner
default org.forgerock.oauth2.core.ResourceOwner getResourceOwner()
It turns instance of IntrospectableToken into ResourceOwner.- Returns:
- The resource owner retrieved from the token.
-
-