Package dev.getelements.elements.sdk.dao
Interface TokensWithExpirationDao
- All Known Implementing Classes:
MongoTokensWithExpirationDao
public interface TokensWithExpirationDao
Manipulates instances of
TokenWithExpiration
within the database.-
Method Summary
Modifier and TypeMethodDescriptioncreateToken
(TokenWithExpiration token) Creates an ofTokenWithExpiration
void
deleteToken
(String tokenId) Deletes the token using its id.void
deleteTokensByUser
(User user) Deletes all existing tokens associated with given usergetTokenExpiry
(String tokenId) Given the token id, will return it's expiry value
-
Method Details
-
createToken
Creates an ofTokenWithExpiration
- Parameters:
token
-- Returns:
- the token's id
-
getTokenExpiry
Given the token id, will return it's expiry value- Parameters:
tokenId
-- Returns:
-
deleteTokensByUser
Deletes all existing tokens associated with given user- Parameters:
user
-
-
deleteToken
Deletes the token using its id.- Parameters:
tokenId
-
-