Package org.forgerock.oauth2.core
Interface IntrospectableToken
- All Superinterfaces:
Token
- All Known Subinterfaces:
AccessToken
- All Known Implementing Classes:
MacaroonToken
An OAuth 2.0 token abstraction for introspection.
-
Method Summary
Modifier and TypeMethodDescriptionGets the session auth level.long
Gets the end user's authentication time in seconds.Gets the token's client id.Gets the custom fields added to the token.long
Gets the token's expiry time.Gets the grant type that was used to produce the token.getRealm()
Gets the token's realm.default org.forgerock.oauth2.core.ResourceOwner
It turns instance of IntrospectableToken into ResourceOwner.Gets the token's resource owner id.getScope()
Gets the token's scopes.boolean
Gets whether the token has expired.Methods inherited from interface org.forgerock.oauth2.core.Token
getAuditTrackingId, getTokenId, getTokenInfo, getTokenName, toJsonValue, toMap
-
Method Details
-
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.
-
getScope
Gets the token's scopes.- Returns:
- The token's scopes.
-
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.
-
getCustomFields
Gets the custom fields added to the token.- Returns:
- The custom fields added to the token.
-