
    Sњh)                     b    S SK r S SKJrJrJr  S SKJr  S SKJr   " S S\ R                  5      r
g)    N)AnyDictOptional)SessionBase)HttpRequestc                       \ rS rSrS\S\\   4S jrS\S\\\\	4      4S jr
S\S\\   4S jr\R                  S\S\4S j5       r\R                  S\S\\   4S	 j5       rS
rg)AbstractTokenStrategy   requestreturnc                 <    UR                   R                  S5      nU$ )z$
Returns the session token, if any.
zx-session-token)headersget)selfr   tokens      WD:\Anime\Ugyen\janka_web_project\venv\Lib\site-packages\allauth/headless/tokens/base.pyget_session_token'AbstractTokenStrategy.get_session_token	   s     ##$56    c                 <    U R                  U5      nU(       d  gSU0$ )z
After authenticating, this method is called to create the access
token response payload, exposing the access token and possibly other
information such as a ``refresh_token`` and ``expires_in``.
Naccess_token)create_access_token)r   r   ats      r   create_access_token_payload1AbstractTokenStrategy.create_access_token_payload   s%     %%g.##r   c                     g)a4  Create an access token.

While session tokens are required to handle the authentication process,
depending on your requirements, a different type of token may be needed
once authenticated.

For example, your app likely needs access to other APIs as well. These
APIs may even be implemented using different technologies, in which case
having a stateless token, possibly a JWT encoding the user ID, might be
a good fit.

We make no assumptions in this regard. If you need access tokens, you
will have to implement a token strategy that returns an access token
here.
N r   r   s     r   r   )AbstractTokenStrategy.create_access_token   s      r   c                     g)z3
Create a session token for the `request.session`.
Nr   r   s     r   create_session_token*AbstractTokenStrategy.create_session_token/   s    
 	r   session_tokenc                     g)zp
Looks up the Django session given the session token. Returns `None`
if the session does not / no longer exist.
Nr   )r   r#   s     r   lookup_session$AbstractTokenStrategy.lookup_session6   s     	r   r   N)__name__
__module____qualname____firstlineno__r   r   strr   r   r   r   r   abcabstractmethodr!   r   r%   __static_attributes__r   r   r   r	   r	      s     # $"$	$sCx.	!$; 8C= $ 	K C   	C H[4I  r   r	   )r,   typingr   r   r   %django.contrib.sessions.backends.baser   django.httpr   ABCr	   r   r   r   <module>r3      s$    
 & & = #4CGG 4r   