
    Tњht                         S SK Jr  S SKJr  S SKJr  S SKJr  \" \R                  5      r	\	R                  r
 " S S5      rg)    )import_module)urlparse)settings)patch_vary_headersc                   *    \ rS rSrSrS rS rS rSrg)LoginSession   a@  Some providers sometimes POST their responses, which due to
CORS/Samesite-cookie rules means that this request cannot access the session
as its session cookie is unavailable.

We work around this by storing the response in a separate, temporary session
and redirecting to a different endpoint that can pick up the flow.
c                     Xl         X l        X0l        [        XS5      U l        U R                  cB  UR
                  R                  U5      n[        U5      U l        [        XU R                  5        gg)z(
Prepares an provider specific session.
N)	requestattribute_namecookie_namegetattrstoreCOOKIESgetSessionStoresetattr)selfr   r   r   session_keys        YD:\Anime\Ugyen\janka_web_project\venv\Lib\site-packages\allauth/socialaccount/sessions.py__init__LoginSession.__init__   s`     ,&Wd;
::!//--k:K%k2DJGTZZ8     c           
      p   [        US5        U R                  R                  5         0 n[        [        SS5      nU(       a  X2S'   UR
                  " U R                  U R                  R                  4SS[        R                  [        UR                  5      R                  [        R                  SS.UD6  g)z$
Save the session and set a cookie.
)CookieSESSION_COOKIE_SAMESITENsamesite)max_ageexpiresdomainpathsecurehttponly)r   r   saver   r   
set_cookier   r   SESSION_COOKIE_DOMAINr   urlr!   SESSION_COOKIE_SECURE)r   responsekwargsr   s       r   r$   LoginSession.save"   s     	8[1

8%>E!):JJ""	
 11(,,',,11	
 	
r   c                 8    U R                   R                  5         g )N)r   delete)r   s    r   r-   LoginSession.delete9   s    

r   )r   r   r   r   N)	__name__
__module____qualname____firstlineno____doc__r   r$   r-   __static_attributes__ r   r   r   r      s    9
.r   r   N)	importlibr   urllib.parser   django.confr   django.utils.cacher   SESSION_ENGINEenginer   r   r5   r   r   <module>r<      s8    # !   1 
x..	/"". .r   