public interface ClientTokenStorageService
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String id) |
List<ClientTokenEntity> |
getAccessTokensExpiringBefore(Instant timestamp) |
Optional<ClientTokenEntity> |
getById(String id) |
ClientTokenEntity |
getByIdOrFail(String id) |
List<ClientTokenEntity> |
getRefreshTokensExpiringBefore(Instant timestamp) |
ClientTokenEntity |
save(ClientTokenEntity clientTokenEntity)
Creates or updates the
ClientTokenEntity |
@Nonnull ClientTokenEntity save(@Nonnull ClientTokenEntity clientTokenEntity) throws TokenNotFoundException
ClientTokenEntityclientTokenEntity - the entity to createTokenNotFoundException - if the token for the given id wasn't foundvoid delete(@Nonnull String id) throws TokenNotFoundException
id - of the ClientTokenEntity to deleteTokenNotFoundException - if the token for the given id wasn't found@Nonnull Optional<ClientTokenEntity> getById(@Nonnull String id)
id - of the ClientTokenEntity from the storeClientTokenEntity from the store for the id, or Optional.empty()@Nonnull ClientTokenEntity getByIdOrFail(@Nonnull String id) throws TokenNotFoundException
id - of the ClientTokenEntity from the storeClientTokenEntity from the store for the idTokenNotFoundException - if the token for the given id wasn't found@Nonnull List<ClientTokenEntity> getAccessTokensExpiringBefore(@Nonnull Instant timestamp)
ClientTokenEntity access tokens expiring before the timestamp, or an empty list@Nonnull List<ClientTokenEntity> getRefreshTokensExpiringBefore(@Nonnull Instant timestamp)
ClientTokenEntity refresh tokens expiring before the timestamp, or an empty listCopyright © 2020 Atlassian. All rights reserved.