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