Interface TokenStore


public interface TokenStore
Interface for storing and retrieving token entities. This interface defines http for saving and finding token entities in the token store. It allows interaction with a storage system (e.g., a database) for token management.

Implementing classes should provide the logic for persisting and querying token entities from a specific data source such as a relational database, in-memory store, etc.

  • Method Details

    • save

      TokenEntity save(TokenEntity tokenEntity)
      Saves a token entity in the store.
      Parameters:
      tokenEntity - the token entity to be saved.
    • findById

      Optional<TokenEntity> findById(String token)
      Finds a token entity by its token string.
      Parameters:
      token - the token string of the entity to be retrieved.
      Returns:
      an Optional containing the found token entity, or Optional.empty() if not found.