Interface IdentifierAccessTokenCodec
-
@ThreadSafe public interface IdentifierAccessTokenCodec
Service Provider Interface (SPI) for generating and decoding identifier-based access tokens. Implementations must be thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.nimbusds.oauth2.sdk.id.Identifier
decode(String tokenValue, TokenCodecContext context)
Decodes the specified bearer access token value to extract the token identifier.IdentifierAccessToken
generate(AccessTokenAuthorization tokenAuthz, TokenEncoderContext context)
Generates a new identifier-based access token.
-
-
-
Method Detail
-
generate
IdentifierAccessToken generate(AccessTokenAuthorization tokenAuthz, TokenEncoderContext context)
Generates a new identifier-based access token.- Parameters:
tokenAuthz
- The access token authorisation. Notnull
.context
- The token encoder context. Notnull
.- Returns:
- The identifier-based access token.
-
decode
com.nimbusds.oauth2.sdk.id.Identifier decode(String tokenValue, TokenCodecContext context) throws TokenDecodeException
Decodes the specified bearer access token value to extract the token identifier.- Parameters:
tokenValue
- The bearer access token value. Notnull
.context
- The token codec context. Notnull
.- Returns:
- The access token identifier.
- Throws:
TokenDecodeException
- If decoding failed.
-
-