public interface AccessToken extends IntrospectableToken
Modifier and Type | Method and Description |
---|---|
void |
addExtraData(String key,
String value)
Deprecated.
Use
AccessToken.addExtraData(String, Supplier) instead. |
void |
addExtraData(String key,
Supplier<String> value)
Stores additional data inside the token.
|
String |
getAuditTrackingId()
Get the audit tracking ID for this token.
|
String |
getAuthGrantId()
Get the grant ID associated with this token.
|
String |
getClaims()
Gets the token's claims.
|
JsonValue |
getConfirmationKey()
Get's the token's confirmation claim.
|
String |
getGrantType()
Gets the grant type that was used to produce the token.
|
String |
getNonce()
Gets the token's nonce.
|
JsonValue |
getPermissions()
Get the UMA permissions contained in the token.
|
String |
getTokenId()
Gets the token's identifier.
|
String |
getTokenType()
Gets the token's type.
|
void |
removeAuditTrackingId()
Removes the audit tracking ID from the token.
|
void |
removeAuthGrantId()
Removes the authorization grant ID from the token.
|
void |
removeAuthLevel()
Removes the authentication level from the token.
|
void |
removeAuthTime()
Removes the auth time from the token.
|
void |
removeClaims()
Removes the claims from the token.
|
void |
removeClientId()
Removes the client ID from the token.
|
void |
removeConfirmationKey()
Removes the confirmation key from the token.
|
void |
removeGrantType()
Removes the grant type from the token.
|
void |
removeNonce()
Removes the nonce from the token.
|
void |
removePermissions()
Removes the UMA permissions from the token.
|
void |
removeRealm()
Removes the realm from the token.
|
void |
removeResourceOwnerId()
Removes the resource owner ID from the token.
|
void |
removeScopes()
Removes the scopes from the token.
|
void |
removeTokenName()
Removes the token name from the token.
|
void |
removeTokenType()
Removes the token type from the token.
|
void |
setAuditTrackingId(String auditTrackingId)
Sets the token's audit tracking ID.
|
void |
setAuthGrantId(String authGrantId)
Sets the grant ID associated with this token.
|
void |
setAuthLevel(Integer authLevel)
Sets the authentication level associated with this access token.
|
void |
setAuthTime(long authTime)
Sets when this access token was created.
|
void |
setClaims(String claims)
Sets the token's claims.
|
void |
setClientId(String clientId)
Sets the client ID for this access token.
|
void |
setConfirmationKey(JsonValue confirmationKey)
Sets the token's confirmation claim.
|
void |
setExpiryTime(long expiryTime)
Sets the expiration time.
|
void |
setField(String field,
Object value)
Sets a field on this access token that will be either stored in CTS, or will be part of the client-side JWT.
|
default void |
setFields(Map<String,Object> fields)
Sets multiple fields on this access token in one go.
|
void |
setGrantType(String grantType)
Sets the token's grant type.
|
void |
setId(String tokenId)
Sets the token ID for this access token.
|
void |
setNonce(String nonce)
Sets the token's nonce.
|
void |
setPermissions(JsonValue permissions)
Set the UMA permissions contained in the token.
|
void |
setRealm(String realm)
Sets the realm for this access token.
|
void |
setResourceOwnerId(String resourceOwnerId)
Sets the resource owner ID for this access token.
|
void |
setScope(Set<String> scopes)
Sets the scopes for this access token.
|
void |
setTokenName(String tokenName)
Sets the token name for this token.
|
void |
setTokenType(String tokenType)
Sets the token's type.
|
Map<String,Object> |
toMap()
Returns a
Map of data associated with this token which the HTTP caller may be wish to receive. |
getAuthLevel, getAuthTimeSeconds, getClientId, getCustomFields, getExpiryTime, getRealm, getResourceOwner, getResourceOwnerId, getScope, isExpired
getTokenInfo, getTokenName, toJsonValue
String getNonce()
void setNonce(String nonce)
nonce
- The token's nonce.void removeNonce()
String getTokenId()
Token
getTokenId
in interface Token
void setId(String tokenId)
UnsupportedOperationException
.tokenId
- The token ID.String getClaims()
void setClaims(String claims)
claims
- The token's claims.void removeClaims()
String getTokenType()
void setTokenType(String tokenType)
tokenType
- The token's type.void removeTokenType()
String getGrantType()
IntrospectableToken
getGrantType
in interface IntrospectableToken
void setGrantType(String grantType)
grantType
- The token's grant type.void removeGrantType()
JsonValue getConfirmationKey()
void setConfirmationKey(JsonValue confirmationKey)
confirmationKey
- The token's confirmation claim.void removeConfirmationKey()
Map<String,Object> toMap()
Token
Map
of data associated with this token which the HTTP caller may be wish to receive.
For example, when requesting an access token, the HTTP response body will contain JSON built using the result of calling this method. This response will include (amongst other things):
@Deprecated void addExtraData(String key, String value)
AccessToken.addExtraData(String, Supplier)
instead.AccessToken.toMap()
.
Any extra data added by this method is transient and will not be persisted.
key
- The key.value
- The value.AccessToken.toMap()
void addExtraData(String key, Supplier<String> value)
key
- The key.value
- The value supplier that returns the value to include inside the token.AccessToken.toMap()
String getAuditTrackingId()
Token
getAuditTrackingId
in interface Token
void setAuditTrackingId(String auditTrackingId)
auditTrackingId
- The token's audit tracking ID.void removeAuditTrackingId()
JsonValue getPermissions()
void setPermissions(JsonValue permissions)
permissions
- The permissions object.void removePermissions()
String getAuthGrantId()
void setAuthGrantId(String authGrantId)
authGrantId
- The grant ID.void removeAuthGrantId()
void setExpiryTime(long expiryTime)
expiryTime
- The expiration time in milliseconds.void setRealm(String realm)
realm
- The realm.void removeRealm()
void setClientId(String clientId)
clientId
- The client ID.void removeClientId()
void setResourceOwnerId(String resourceOwnerId)
resourceOwnerId
- The resource owner ID.void removeResourceOwnerId()
void setScope(Set<String> scopes)
scopes
- The scopes.void removeScopes()
void setAuthTime(long authTime)
authTime
- The time this access token was created in seconds.void removeAuthTime()
void setAuthLevel(Integer authLevel)
authLevel
- The authentication level associated with this access token.void removeAuthLevel()
void setTokenName(String tokenName)
tokenName
- The name of the token.void removeTokenName()
void setField(String field, Object value)
field
- The name of the field to set.value
- The value to associate with the field. May not be null.Copyright © 2010-2018, ForgeRock All Rights Reserved.