Interface OneTimeTokenRepository
- All Known Implementing Classes:
InMemoryOneTimeTokenRepository, JdbcOneTimeTokenRepository
public interface OneTimeTokenRepository
Where
OneTimeTokenService keeps the tokens it has given out: never a
token, only its hash.-
Method Summary
Modifier and TypeMethodDescriptionUses a token up.voidDrops every tokenusernamehas forpurpose.voidKeeps a token forusername, in place of any that user had forpurpose: the newest link is the only one that works.
-
Method Details
-
save
Keeps a token for
username, in place of any that user had forpurpose: the newest link is the only one that works.Parameters
tokenHash: the token's hashpurpose: what the token may be used forusername: whose it isnow: the moment, epoch milliseconds; tokens that expired before it may be droppedexpiresAt: when the token stops working, epoch milliseconds
-
consume
-
removeAll
-