Package tech.lastbox.jwt
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 Summary
Modifier and TypeMethodDescriptionFinds a token entity by its token string.save(TokenEntity tokenEntity) Saves a token entity in the store.
-
Method Details
-
save
Saves a token entity in the store.- Parameters:
tokenEntity- the token entity to be saved.
-
findById
Finds a token entity by its token string.- Parameters:
token- the token string of the entity to be retrieved.- Returns:
- an
Optionalcontaining the found token entity, orOptional.empty()if not found.
-