Interface VerifiedEmailRepository
- All Known Implementing Classes:
InMemoryVerifiedEmailRepository, JdbcVerifiedEmailRepository
public interface VerifiedEmailRepository
Where
EmailVerificationService keeps each user's address and whether it
has been proved.-
Method Summary
Modifier and TypeMethodDescriptionvoidForgetsusername's address.The addressusernameclaims, proved or not, or null.findVerifiedEmail(String username) The addressusernamehas proved, or null when they claim none or have not proved the one they claim.booleanisVerified(String username) Whether the addressusernameclaims has been proved.booleanmarkVerified(String username, String proof, long now) Marks the addressusernameclaims as proved atnow, whenproofis the one it was recorded with.voidsavePending(String username, String email, String proof) Recordsemailas the addressusernameclaims, not yet proved, in place of whatever was recorded -- a proved address included: a user has one address, and it is the one they gave last.
-
Method Details
-
savePending
Recordsemailas the addressusernameclaims, not yet proved, in place of whatever was recorded -- a proved address included: a user has one address, and it is the one they gave last. An application that wants the old one to stand until the new one is proved keeps it in its own table and calls this when it lets go of it.proofis whatmarkVerified(String, String, long)has to be given for this address: it stands for the one link that was mailed there, so a link mailed to an earlier address proves nothing about this one. -
markVerified
-
findEmail
-
findVerifiedEmail
-
isVerified
Whether the addressusernameclaims has been proved. -
delete
Forgetsusername's address.
-