MCPcopy
hub / github.com/authlib/authlib / session

Method session

tests/django_helper.py:8–17  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6class RequestClient(RequestFactory):
7 @property
8 def session(self):
9 engine = import_module(settings.SESSION_ENGINE)
10 cookie = self.cookies.get(settings.SESSION_COOKIE_NAME)
11 if cookie:
12 return engine.SessionStore(cookie.value)
13
14 session = engine.SessionStore()
15 session.save()
16 self.cookies[settings.SESSION_COOKIE_NAME] = session.session_key
17 return session

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected