@Immutable public final class IdentifierAccessToken extends Object
Sample access token that is a 128 bit random identifier:
NNEYDTdMd2qRiwq-GS6UiQ
Sample access token with the same 128 bit random identifier, protected with HMAC SHA-256 truncated to 128 bits:
NNEYDTdMd2qRiwq-GS6UiQ.ZTOq370aTUQbpljYhJPbHw
Constructor and Description |
---|
IdentifierAccessToken(com.nimbusds.oauth2.sdk.id.Identifier id)
Creates a new identifier-based access token.
|
IdentifierAccessToken(com.nimbusds.oauth2.sdk.id.Identifier id,
String tokenValue)
Creates a new identifier-based access token.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
com.nimbusds.oauth2.sdk.id.Identifier |
getIdentifier()
Returns the access token identifier.
|
String |
getTokenValue()
Returns the value of the bearer access token.
|
int |
hashCode() |
String |
toString() |
public IdentifierAccessToken(com.nimbusds.oauth2.sdk.id.Identifier id)
id
- The identifier to use as unique key for the token
authorisation in the Connect2id server. Must be
sufficiently long and random to make brute force guessing
impractical. Must not be null
.public IdentifierAccessToken(com.nimbusds.oauth2.sdk.id.Identifier id, String tokenValue)
id
- The identifier to use as unique key for the token
authorisation in the Connect2id server. Must be
sufficiently long and random to make brute force
guessing impractical. Must not be null
.tokenValue
- The value of the bearer access token. May
represent the string representation of the
specified identifier, some other encoding, or
include additional security protection (e.g. HMAC
to detect illegal / fake tokens). Must not be
null
.public com.nimbusds.oauth2.sdk.id.Identifier getIdentifier()
public String getTokenValue()
Copyright © 2021 Connect2id Ltd.. All rights reserved.