A sign-in from mooc.fi waiting for the student to confirm it on the landing page: after a cross-site arrival, or when another account is signed in. The browser holds the token in an HttpOnly cookie; a row rather than a signed token so that continuing is single use. Pruned a day after expiry.
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| client_ip_hash | text | false | Keyed hash of the IP the handoff was minted for; continuing from another IP is refused. | |||
| created_at | timestamp with time zone | now() | false | Timestamp when the record was created. | ||
| deleted_at | timestamp with time zone | true | Timestamp when the record was deleted. If null, the record is not deleted. | |||
| expires_at | timestamp with time zone | false | When the continuation stops working, minutes after the handoff was redeemed. | |||
| id | uuid | uuid_generate_v4() | false | A unique, stable identifier for the record. | ||
| moocfi_course_id | uuid | false | The mooc.fi course whose registration page the student continues to. Only the landing page of this course can continue it. | |||
| token_digest | bytea | false | SHA-256 of the token in the cookie. The token itself is never stored. | |||
| ui_language | varchar(15) | true | The language mooc.fi was used in, fi or en, which the registration page opens in. NULL leaves the page to choose. | |||
| updated_at | timestamp with time zone | now() | false | Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger. | ||
| used_at | timestamp with time zone | true | When the student continued. Set once: a second continue is refused. | |||
| user_id | uuid | false | public.users | The account the handoff signs in. |
| Name | Type | Definition |
|---|---|---|
| moocfi_handoff_continuations_client_ip_hash_not_null | n | NOT NULL client_ip_hash |
| moocfi_handoff_continuations_created_at_not_null | n | NOT NULL created_at |
| moocfi_handoff_continuations_expires_at_not_null | n | NOT NULL expires_at |
| moocfi_handoff_continuations_id_not_null | n | NOT NULL id |
| moocfi_handoff_continuations_moocfi_course_id_not_null | n | NOT NULL moocfi_course_id |
| moocfi_handoff_continuations_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| moocfi_handoff_continuations_token_digest_not_null | n | NOT NULL token_digest |
| moocfi_handoff_continuations_updated_at_not_null | n | NOT NULL updated_at |
| moocfi_handoff_continuations_user_id_fkey | FOREIGN KEY | FOREIGN KEY (user_id) REFERENCES users(id) |
| moocfi_handoff_continuations_user_id_not_null | n | NOT NULL user_id |
| Name | Definition |
|---|---|
| idx_moocfi_handoff_continuations_expires_at | CREATE INDEX idx_moocfi_handoff_continuations_expires_at ON public.moocfi_handoff_continuations USING btree (expires_at) |
| moocfi_handoff_continuations_pkey | CREATE UNIQUE INDEX moocfi_handoff_continuations_pkey ON public.moocfi_handoff_continuations USING btree (id) |
| uq_moocfi_handoff_continuations_token_digest | CREATE UNIQUE INDEX uq_moocfi_handoff_continuations_token_digest ON public.moocfi_handoff_continuations USING btree (token_digest) |
| Name | Definition |
|---|---|
| set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.moocfi_handoff_continuations FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls