تمدید¶
middlewareی که توکن access را سر راه تمدید میکند، و گامهایی که از آنها ساخته شده.
از خود کد خوانده میشود، پس هیچوقت از آن عقب نمیماند. توضیحها مال خود کد هستند، به انگلیسی.
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.