Renewal¶
The middleware that renews the access token on the way through, and the steps it is made of.
Read from the code itself, so it never falls behind it. The descriptions are the code's own, in English.
RenewalMiddleware
¶
Renews the access cookie in place, before any view reads it - sync or async.
renew
¶
What this request's session needs: a new access token, to be cleared, or nothing.
Nothing when there is no refresh cookie - a client signed in by header never had one, and clearing would delete cookies it never set - or when the access token is still good.
settle
¶
Put the outcome on response - unless the view already set the session itself.
Answers the outcome that reached the response, or None when nothing did.
announcement
¶
The signal an outcome that reached the response is told by, and what it carries.
Renewed
dataclass
¶
A new access token for person, and how long its cookie may last.
Over
dataclass
¶
The session is over: clear both cookies on the way out.