public class StatefulAccessToken extends StatefulToken implements AccessToken
Constructor and Description |
---|
StatefulAccessToken(org.forgerock.json.JsonValue token)
Constructs a new AccessToken backed with the data in the specified JsonValue.
|
StatefulAccessToken(org.forgerock.json.JsonValue token,
String tokenName,
String tokenId)
Constructs a new AccessToken backed with the data in the specified JsonValue.
|
StatefulAccessToken(String id,
String authorizationCode,
String resourceOwnerId,
String clientId,
String redirectUri,
Set<String> scope,
long expiryTime,
RefreshToken refreshToken,
String tokenName,
String grantType,
String nonce,
String realm,
String claims,
String auditTrackingId,
org.forgerock.json.JsonValue confirmationKey)
Constructs a new AccessToken.
|
StatefulAccessToken(String id,
String authorizationCode,
String resourceOwnerId,
String clientId,
String redirectUri,
Set<String> scope,
long expiryTime,
RefreshToken refreshToken,
String tokenName,
String grantType,
String nonce,
String realm,
String claims,
String auditTrackingId,
long authTime,
org.forgerock.json.JsonValue confirmationKey)
Constructs a new AccessToken.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtraData(String key,
String value)
Adds additional data to the Access Token.
|
protected long |
defaultExpireTime() |
String |
getAuditTrackingId()
Gets the audit id.
|
AuditConstants.TrackingIdKey |
getAuditTrackingIdKey()
Get the audit tracking ID key for this token.
|
long |
getAuthTimeSeconds()
Gets the end user's authentication time in seconds.
|
String |
getClientId()
Gets the client's id.
|
org.forgerock.json.JsonValue |
getConfirmationKey()
Get's the tokens confirmation claim.
|
long |
getExpiryTime()
Gets the token's expiry time.
|
String |
getGrantType()
Gets the grant type.
|
String |
getNonce()
Gets the nonce.
|
String |
getRealm()
Gets the realm.
|
String |
getResourceOwnerId()
Gets the resource owner's id.
|
protected String |
getResourceString(String s)
Gets the display String for the given String.
|
Set<String> |
getScope()
Gets the scope.
|
String |
getSessionId()
Gets the session id used to create the authorisation code
|
String |
getTokenId()
Gets the token's identifier.
|
Map<String,Object> |
getTokenInfo()
Gets the token's information.
|
String |
getTokenName()
Gets the token's name.
|
String |
getTokenType()
Gets the token type.
|
protected void |
setAuditTrackingId(String auditId)
Sets the audit id.
|
protected void |
setAuthorizationCode(String authorizationCode)
Sets the authorization code.
|
protected void |
setAuthTime(long authTime)
Sets the end user's original authentication
time in seconds since epoch.
|
void |
setClaims(String claims) |
protected void |
setClientId(String clientId)
Sets the client's id.
|
protected void |
setConfirmationKey(org.forgerock.json.JsonValue confirmationKey)
Sets the confirmation key.
|
protected void |
setExpiryTime(long expiryTime)
Sets the expiry time.
|
protected void |
setGrantType(String grantType)
Sets the grant type.
|
protected void |
setId(String id)
Sets the token id.
|
protected void |
setNonce(String nonce)
Sets the nonce.
|
protected void |
setRedirectUri(String redirectUri)
Sets the redirect uri.
|
protected void |
setRefreshTokenId(String refreshTokenId)
Sets the refresh token id.
|
protected void |
setResourceOwnerId(String resourceOwnerId)
Sets the resource owner's id.
|
protected void |
setScope(Set<String> scope)
Sets the scope.
|
protected void |
setTokenName(String tokenName)
Sets the token name.
|
protected void |
setTokenType(String tokenType)
Sets the token type.
|
Map<String,Object> |
toMap()
Converts the token into a
Map of its key data. |
String |
toString() |
getClaims, getSetProperty, getStringProperty, getTimeLeft, isExpired, setAuthGrantId, setStringProperty, toJsonValue
add, add, add, add, addPermissive, array, as, asBigDecimal, asBoolean, asCollection, asCollection, asDouble, asEnum, asInteger, asList, asList, asLong, asMap, asMap, asMapOfList, asNumber, asSet, asSet, asString, asURI, clear, clone, contains, copy, defaultTo, diff, expect, field, fieldIfNotNull, get, get, get, getObject, getPointer, isBoolean, isCollection, isDefined, isEqualTo, isList, isMap, isNotNull, isNull, isNumber, isSet, isString, iterator, json, keys, object, object, patch, put, put, put, putPermissive, remove, remove, remove, required, set, setObject, size, toIndex
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getClaims
isExpired
toJsonValue
forEach, spliterator
public StatefulAccessToken(org.forgerock.json.JsonValue token) throws InvalidGrantException
token
- The JsonValue of the token.InvalidGrantException
- If the given token is not an Access Token.public StatefulAccessToken(org.forgerock.json.JsonValue token, String tokenName, String tokenId) throws InvalidGrantException
token
- The JsonValue of the token.tokenName
- The token name.tokenId
- The token identifier.InvalidGrantException
- If the given token is not an Access Token.public StatefulAccessToken(String id, String authorizationCode, String resourceOwnerId, String clientId, String redirectUri, Set<String> scope, long expiryTime, RefreshToken refreshToken, String tokenName, String grantType, String nonce, String realm, String claims, String auditTrackingId, org.forgerock.json.JsonValue confirmationKey)
id
- The token id.authorizationCode
- The authorization code.resourceOwnerId
- The resource owner's id.clientId
- The client's id.redirectUri
- The redirect uri.scope
- The scope.expiryTime
- The expiry time.refreshToken
- The refresh token.tokenName
- The token name.grantType
- The grant type.nonce
- The nonce.realm
- The realm.claims
- The requested claims.auditTrackingId
- The tracking ID, used for tracking tokens throughout the audit logs.confirmationKey
- JSON confirmation keypublic StatefulAccessToken(String id, String authorizationCode, String resourceOwnerId, String clientId, String redirectUri, Set<String> scope, long expiryTime, RefreshToken refreshToken, String tokenName, String grantType, String nonce, String realm, String claims, String auditTrackingId, long authTime, org.forgerock.json.JsonValue confirmationKey)
id
- The token id.authorizationCode
- The authorization code.resourceOwnerId
- The resource owner's id.clientId
- The client's id.redirectUri
- The redirect uri.scope
- The scope.expiryTime
- The expiry time.refreshToken
- The refresh token.tokenName
- The token name.grantType
- The grant type.nonce
- The nonce.realm
- The realm.claims
- The requested claims.auditTrackingId
- The tracking ID, used for tracking tokens throughout the audit logs.authTime
- The end user's original auth time.confirmationKey
- JSON confirmation keypublic void setClaims(String claims)
protected void setId(String id)
setId
in class StatefulToken
id
- The token id.protected void setResourceOwnerId(String resourceOwnerId)
setResourceOwnerId
in class StatefulToken
resourceOwnerId
- The resource owner's id.protected void setClientId(String clientId)
setClientId
in class StatefulToken
clientId
- The client's id.protected void setRedirectUri(String redirectUri)
setRedirectUri
in class StatefulToken
redirectUri
- The redirect uri.protected void setScope(Set<String> scope)
setScope
in class StatefulToken
scope
- The scope.protected void setExpiryTime(long expiryTime)
setExpiryTime
in class StatefulToken
expiryTime
- The expiry time.protected void setTokenType(String tokenType)
setTokenType
in class StatefulToken
tokenType
- The token type.protected void setTokenName(String tokenName)
setTokenName
in class StatefulToken
tokenName
- The token name.protected void setGrantType(String grantType)
setGrantType
in class StatefulToken
grantType
- The grant type.protected String getResourceString(String s)
getResourceString
in class StatefulToken
s
- The String.public Set<String> getScope()
getScope
in interface IntrospectableToken
getScope
in class StatefulToken
public String getClientId()
getClientId
in interface IntrospectableToken
getClientId
in class StatefulToken
public String getResourceOwnerId()
getResourceOwnerId
in interface IntrospectableToken
getResourceOwnerId
in class StatefulToken
public String getTokenId()
getTokenId
in interface AccessToken
getTokenId
in interface Token
getTokenId
in class StatefulToken
public String getRealm()
getRealm
in interface IntrospectableToken
getRealm
in class StatefulToken
public String getTokenName()
getTokenName
in interface Token
getTokenName
in class StatefulToken
public long getExpiryTime()
getExpiryTime
in interface IntrospectableToken
getExpiryTime
in class StatefulToken
public String getTokenType()
getTokenType
in interface AccessToken
getTokenType
in class StatefulToken
protected void setAuthorizationCode(String authorizationCode)
authorizationCode
- The authorization code.protected void setRefreshTokenId(String refreshTokenId)
refreshTokenId
- The refresh token id.protected void setNonce(String nonce)
nonce
- The nonce.public String getNonce()
getNonce
in interface AccessToken
public String getSessionId()
getSessionId
in interface AccessToken
protected long defaultExpireTime()
defaultExpireTime
in class StatefulToken
public String getGrantType()
getGrantType
in interface AccessToken
public org.forgerock.json.JsonValue getConfirmationKey()
AccessToken
getConfirmationKey
in interface AccessToken
protected void setConfirmationKey(org.forgerock.json.JsonValue confirmationKey)
confirmationKey
- the non-null JSON confirmation keypublic Map<String,Object> toMap()
Token
Map
of its key data.toMap
in interface AccessToken
toMap
in interface Token
Map
of the token's key data.public Map<String,Object> getTokenInfo()
Token
getTokenInfo
in interface Token
Map
of the token's information.public AuditConstants.TrackingIdKey getAuditTrackingIdKey()
Token
getAuditTrackingIdKey
in interface Token
public void addExtraData(String key, String value)
Adds additional data to the Access Token.
If the value is null
then this method will ensure that the key is not present in the map.
addExtraData
in interface AccessToken
key
- The key.value
- The value.protected void setAuditTrackingId(String auditId)
auditId
- The audit id.public String getAuditTrackingId()
getAuditTrackingId
in interface AccessToken
getAuditTrackingId
in interface Token
getAuditTrackingId
in class StatefulToken
protected void setAuthTime(long authTime)
setAuthTime
in class StatefulToken
authTime
- The authentication time.public long getAuthTimeSeconds()
getAuthTimeSeconds
in interface IntrospectableToken
getAuthTimeSeconds
in class StatefulToken
public String toString()
toString
in class org.forgerock.json.JsonValue
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.