Interface TokensWithExpirationDao

All Known Implementing Classes:
MongoTokensWithExpirationDao

public interface TokensWithExpirationDao
Manipulates instances of TokenWithExpiration within the database.
  • Method Details

    • createToken

      String createToken(TokenWithExpiration token)
      Creates an of TokenWithExpiration
      Parameters:
      token -
      Returns:
      the token's id
    • getTokenExpiry

      Timestamp getTokenExpiry(String tokenId)
      Given the token id, will return it's expiry value
      Parameters:
      tokenId -
      Returns:
    • deleteTokensByUser

      void deleteTokensByUser(User user)
      Deletes all existing tokens associated with given user
      Parameters:
      user -
    • deleteToken

      void deleteToken(String tokenId)
      Deletes the token using its id.
      Parameters:
      tokenId -