Interface TokenManagementService
- All Known Implementing Classes:
TokenManagementServiceImpl
@Service
public interface TokenManagementService
A service for managing token related operations like
invalidating/blacklisting tokens- or verifying their availability.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a token to the database.void
blacklistToken
(String token) Blacklist a token.void
Deletes expired tokens from the database.boolean
isBlacklisted
(String token) Checks if a token is blacklisted or not.
-
Method Details
-
blacklistToken
Blacklist a token.- Parameters:
token
- The token to blacklist.
-
isBlacklisted
Checks if a token is blacklisted or not.- Parameters:
token
- The token to check.- Returns:
true
if the token is blacklisted,false
otherwise.
-
addToken
Adds a token to the database.- Parameters:
token
- The token to be added.
-
deleteExpiredTokens
void deleteExpiredTokens()Deletes expired tokens from the database.
-