Interface TokenDataAccessProvider
- All Superinterfaces:
DataAccessProvider
-
Method Summary
Modifier and TypeMethodDescriptionvoidCreate a new Token from the provided instance.Retrieve the Token instance based on the provided token hash.Deprecated, for removal: This API element is subject to removal in a future version.since 5.4.0Retrieve the status of a token with the provided tokenHash.longsetStatus(String tokenId, TokenStatus newStatus) Deprecated, for removal: This API element is subject to removal in a future version.since 7.1.0longsetStatusByTokenHash(String tokenHash, TokenStatus newStatus) Update status of token.Methods inherited from interface se.curity.identityserver.sdk.datasource.DataAccessProvider
isThreadSafe
-
Method Details
-
getByHash
Retrieve the Token instance based on the provided token hash.- Parameters:
tokenHash- hash of the token value to look up status- Returns:
- instantiated Token instance
-
getById
@Deprecated(forRemoval=true, since="5.4.0") @Nullable default @Nullable Token getById(String tokenId) Deprecated, for removal: This API element is subject to removal in a future version.since 5.4.0Retrieve the Token instance based on the provided id.Note: not all Tokens have an id!
- Parameters:
tokenId- id of the token to lookup- Returns:
- instantiated Token instance
-
create
Create a new Token from the provided instance.- Parameters:
token- token to persist
-
getStatus
Retrieve the status of a token with the provided tokenHash.- Parameters:
tokenHash- hash of the token value to look up status- Returns:
- token status, or empty when token was not found
-
setStatusByTokenHash
Update status of token.- Parameters:
tokenHash- hash of the token value to look up statusnewStatus- new status of the token- Returns:
- the number of records that were updated.
-
setStatus
Deprecated, for removal: This API element is subject to removal in a future version.since 7.1.0Update status of token.- Parameters:
tokenId- ID of the token to look up statusnewStatus- new status of the token- Returns:
- the number of records that were updated.
-