Interface TokenDeletionStrategy


public interface TokenDeletionStrategy
Is responsible for deleting expired tokens and performing any post-processing.

Implementations should be made available to the TokenDeleter via the Java ServiceLoader framework.

At most one TokenDeletionStrategy should be defined per TokenType.

  • Method Details

    • getSupportedTokenTypes

      Set<TokenType> getSupportedTokenTypes()
      Returns the set of token types this deletion strategy can handle. Must not intersect with any other TokenDeletionStrategys.
      Returns:
      The set of supported token types
    • delete

      Promise<PartialToken,CoreTokenException> delete(String tokenId, TokenType tokenType, long expiryTime)
      Delete the token from the CTS persistence store.
      Parameters:
      tokenId - The ID of the token to be deleted.
      tokenType - The type of the token to be deleted.
      expiryTime - The time at which this token is currently due to expire and be eligible for deletion.
      Returns:
      A promise which allows the caller to know when the delete request completed and whether or not any exception was thrown in the attempt.