Structs§
Enums§
- User
Email Code Purpose - What a code authorises. Every read is scoped by it, so a code mailed for one action cannot be spent on another.
Functions§
- generate_
code - A fresh code for mailing to a user.
- get_
unused_ user_ email_ code_ with_ user_ id - insert_
user_ email_ code - Retires the user’s outstanding code for
purposeand inserts a new one. - is_
reset_ user_ email_ code_ valid - mark_
user_ email_ code_ used - record_
failed_ attempt - Counts a wrong guess against the user’s live code and retires it once
max_attemptsis reached.