Skip to main content

Module open_university_product_access_tokens

Module open_university_product_access_tokens 

Source

Structs§

NewOpenUniversityProductAccessToken
OpenUniversityProductAccessToken

Constants§

OPEN_UNIVERSITY_ENROLMENT_BASE_URL 🔒
The same base the scraped registration links used, so a student sees the page they saw before this pipeline existed.

Functions§

enrolment_url
The enrolment page a student with no usable enrolment is sent to, or None for a product whose refresh has never succeeded. The token is exposed here on purpose and nowhere else: it must not reach a log line or a stored response body.
enrolment_url_for_product
The enrolment page for a module’s configured product, following the whole fallback chain: no product configured, or no refresh has ever succeeded for it, means None and the caller degrades to generic “enrol in Sisu” copy.
get_all
get_by_product_id
record_refresh_failure
Records a failed refresh without touching the token: a stale token still beats none.
soft_delete
upsert
Stores a freshly fetched token, replacing whatever we held for the product.