Views¶
Refreshing a session, ending it, and handing the CSRF token to a frontend on another site.
Read from the code itself, so it never falls behind it. The descriptions are the code's own, in English.
RefreshView
¶
Bases: APIView
A new pair for the refresh token presented, which is blacklisted.
SignOutView
¶
Bases: APIView
The refresh token presented is blacklisted, and both cookies cleared.
CsrfTokenView
¶
Bases: APIView
GET: the CSRF token, for a frontend on another site, which cannot read the API's cookie.
Only needed with CSRF = True. The answer is {"csrf_token": "..."},
and the CSRF cookie it belongs with is set on the same response.
enforce_csrf
¶
Refuse request with 403 when the CSRF mode is on and its token is missing or wrong.
presented
¶
The refresh token this request presents, and whether it came in the cookie.
readable
¶
raw as a refresh token still good - not expired, garbled or blacklisted.
blacklist
¶
Blacklist refresh - when the project runs the blacklist at all.