Class IdentifierAccessToken
java.lang.Object
com.nimbusds.openid.connect.provider.spi.tokens.IdentifierAccessToken
Identifier-based access token. The identifier must be sufficiently long and
random to make brute force guessing impractical. The value of the access
token value may be a direct string representation of the identifier, have
some other encoding, or include additional security protection (e.g. HMAC to
detect illegal / fake tokens).
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 Summary
ConstructorDescriptionIdentifierAccessToken
(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. -
Method Summary
-
Constructor Details
-
IdentifierAccessToken
Creates a new identifier-based access token. The token value will be set to the string representation of the specified identifier.- Parameters:
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 benull
.
-
IdentifierAccessToken
Creates a new identifier-based access token.- Parameters:
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 benull
.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 benull
.
-
-
Method Details
-
getIdentifier
Returns the access token identifier.- Returns:
- The access token identifier.
-
getTokenValue
Returns the value of the bearer access token.- Returns:
- The token value.
-
toString
-
equals
-
hashCode
-