public class StatefulRefreshToken extends StatefulToken implements RefreshToken
Constructor and Description |
---|
StatefulRefreshToken(org.forgerock.json.JsonValue token)
Constructs a new RefreshToken backed with the data in the specified JsonValue.
|
StatefulRefreshToken(String id,
String resourceOwnerId,
String clientId,
String redirectUri,
Set<String> scope,
long expiryTime,
String tokenType,
String tokenName,
String grantType,
String realm,
String authModules,
String acr,
String auditId,
String authGrantId)
Constructs a new RefreshToken.
|
StatefulRefreshToken(String id,
String resourceOwnerId,
String clientId,
String redirectUri,
Set<String> scope,
long expiryTime,
String tokenType,
String tokenName,
String grantType,
String realm,
String authModules,
String acr,
String auditId,
String authGrantId,
long authTime)
Constructs a new RefreshToken.
|
Modifier and Type | Method and Description |
---|---|
protected long |
defaultExpireTime() |
String |
getAuditTrackingId()
Gets the audit id.
|
AuditConstants.TrackingIdKey |
getAuditTrackingIdKey()
Get the audit tracking ID key for this token.
|
String |
getAuthenticationContextClassReference()
Get the Authentication Context Class Reference (acr).
|
String |
getAuthGrantId()
Gets the token's Auth Grant id.
|
String |
getAuthModules()
Gets the auth modules used for authentication.
|
long |
getAuthTimeSeconds()
Gets the end user's authentication time in seconds.
|
String |
getClaims()
Gets the requested claims.
|
long |
getExpiryTime()
Gets the token's expiry time.
|
String |
getRealm()
Gets the realm.
|
String |
getRedirectUri()
Gets the client's redirect uri.
|
protected String |
getResourceString(String s)
Gets the display String for the given String.
|
Set<String> |
getScope()
Gets the scope.
|
protected Long |
getTimeLeft() |
Map<String,Object> |
getTokenInfo()
Gets the token's information.
|
boolean |
isExpired()
Determines if the Refresh Token has expired.
|
protected void |
setAuditTrackingId(String auditId)
Sets the audit id.
|
protected void |
setAuthenticationContextClassReference(String acr)
Sets the authentication context class reference (acr).
|
protected void |
setAuthModules(String authModules)
Sets the auth modules used for authentication.
|
protected void |
setAuthTime(long authTime)
Sets the end user's original authentication
time in seconds since epoch.
|
void |
setClaims(String claims)
Sets the requested claims.
|
protected void |
setExpiryTime(long expiryTime)
Sets the expiry time.
|
protected void |
setScope(Set<String> scope)
Sets the scope.
|
Map<String,Object> |
toMap()
Converts the token into a
Map of its key data. |
String |
toString() |
getClientId, getResourceOwnerId, getSetProperty, getStringProperty, getTokenId, getTokenName, getTokenType, setAuthGrantId, setClientId, setGrantType, setId, setRedirectUri, setResourceOwnerId, setStringProperty, setTokenName, setTokenType, 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
getTokenId, getTokenType
getClientId, getResourceOwnerId
getTokenName, toJsonValue
forEach, spliterator
public StatefulRefreshToken(org.forgerock.json.JsonValue token) throws InvalidGrantException
token
- The JsonValue of the token.InvalidGrantException
- If the given token is not a Refresh Token.public StatefulRefreshToken(String id, String resourceOwnerId, String clientId, String redirectUri, Set<String> scope, long expiryTime, String tokenType, String tokenName, String grantType, String realm, String authModules, String acr, String auditId, String authGrantId)
id
- The token id.resourceOwnerId
- The resource owner's id.clientId
- The client's id.redirectUri
- The redirect uri.scope
- The scope.expiryTime
- The expiry time.tokenType
- The token type.tokenName
- The token name.grantType
- The grant type.realm
- The realm.authModules
- The pipe-separated list of auth modules.acr
- The authentication context.auditId
- The audit id, used for tracking tokens throughout the audit logs.authGrantId
- The authorization grant id.public StatefulRefreshToken(String id, String resourceOwnerId, String clientId, String redirectUri, Set<String> scope, long expiryTime, String tokenType, String tokenName, String grantType, String realm, String authModules, String acr, String auditId, String authGrantId, long authTime)
id
- The token id.resourceOwnerId
- The resource owner's id.clientId
- The client's id.redirectUri
- The redirect uri.scope
- The scope.expiryTime
- The expiry time.tokenType
- The token type.tokenName
- The token name.grantType
- The grant type.realm
- The realm.authModules
- The pipe-separated list of auth modules.acr
- The authentication context.auditId
- The audit id, used for tracking tokens throughout the audit logs.authGrantId
- The authorization grant id.authTime
- The end user's original auth time in seconds.public void setClaims(String claims)
claims
- Requested claimspublic String getClaims()
getClaims
in interface RefreshToken
getClaims
in class StatefulToken
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.public String getRealm()
getRealm
in interface IntrospectableToken
getRealm
in class StatefulToken
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 long getExpiryTime()
getExpiryTime
in interface IntrospectableToken
getExpiryTime
in class StatefulToken
protected void setAuthModules(String authModules)
authModules
- A pipe-delimited string of auth module names.protected void setAuthenticationContextClassReference(String acr)
acr
- The acr.public String getRedirectUri()
getRedirectUri
in interface RefreshToken
public String getAuthenticationContextClassReference()
getAuthenticationContextClassReference
in interface RefreshToken
public boolean isExpired()
isExpired
in interface IntrospectableToken
isExpired
in class StatefulToken
true
if current time is greater than the expiry time.protected long defaultExpireTime()
defaultExpireTime
in class StatefulToken
public String getAuthModules()
getAuthModules
in interface RefreshToken
public Map<String,Object> toMap()
Token
Map
of its key data.toMap
in interface RefreshToken
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 String getAuthGrantId()
RefreshToken
getAuthGrantId
in interface RefreshToken
protected Long getTimeLeft()
getTimeLeft
in class StatefulToken
protected void setAuditTrackingId(String auditId)
auditId
- The audit id.public String getAuditTrackingId()
getAuditTrackingId
in interface RefreshToken
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.