Structs§
- NewStudent
Number Verification Token - Seed
Student Number Verification Token - A token row with everything pinned, for the seed only.
- Student
Number Verification Token
Constants§
- TOKEN_
LENGTH 🔒 - Length of a linking token, which is the only proof of ownership and is bound to no account.
Functions§
- claim
- Marks the token claimed by the account. Returns false if another claim already won the race.
- get_
by_ id - get_
unclaimed_ by_ token - Looks up an unused, unexpired token without claiming it; claiming is a separate explicit
POST. - insert
- Mints a token for a Sisu person, bound to no account: the click while logged in creates the binding. Returns the row id and the plaintext token for the mailed link.
- insert_
seed_ row - Seeds a token with a fixed plaintext value and a chosen expiry/claim state, which
insertcannot do: system tests need the valid, expired and used links to be constants. Seed use only. - is_
valid - maybe_
cleanup_ expired - Probabilistic cleanup instead of a cron.
- soft_
delete_ unused_ for_ student_ number - Retires outstanding tokens for a student number, once the link was established some other way.