
    )Jf                         d dl mZ d dlmZ d dlmZmZmZ ddlm	Z	 g dZ
 G d de          Z ej        e          Z ej        e          Zd	S )
    )md5)get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginView   )OdnoklassnikiProvider)agebirthdaycurrent_statuscurrent_status_datecurrent_status_idemail
first_namegender	has_email	last_namelocalelocationnameonlinephoto_idpic1024x768
pic190x190
pic640x480pic_1pic_2uidc                   2    e Zd Zej        ZdZdZdZdZ	d Z
dS )OdnoklassnikiOAuth2Adapterz+https://api.odnoklassniki.ru/oauth/token.doz,https://www.odnoklassniki.ru/oauth/authorizez"https://api.odnoklassniki.ru/fb.doPOSTc                    d|j         d                    t                    d|j        d}t	          d                    |d         |j                                      d                                                    }t          d |
                                D                       }t	          d	                    |          |z                       d                                                    |d
<   t                                                                          | j        |          }|                                }	|                                                     ||	          S )Nzusers.getCurrentUser,JSON)methodaccess_tokenfieldsformatapplication_keyz
{0:s}{1:s}r&   zutf-8c                 L    g | ]!\  }}|d k    d                     ||          "S )r&   z{0:s}={1:s})r(   ).0kvs      v/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/allauth/socialaccount/providers/odnoklassniki/views.py
<listcomp>z=OdnoklassnikiOAuth2Adapter.complete_login.<locals>.<listcomp>9   s6    XXXDAqADWDW]!!!Q''DWDWDW     sig)params)tokenjoinUSER_FIELDSkeyr   r(   secretencode	hexdigestsorteditemsr   get_requests_sessiongetprofile_urljsonget_providersociallogin_from_response)
selfrequestappr4   kwargsdatasuffix
check_listresponse
extra_datas
             r.   complete_loginz)OdnoklassnikiOAuth2Adapter.complete_login-   s;   ,!Khh{++"w
 
 ^ 4cjAAHHQQ
 

)++ 	 XXDJJLLXXX
 

 277:..7??HHIISSUUU MM..0044T5Ed4SS 	 ]]__
  ""<<WjQQQr0   N)__name__
__module____qualname__r	   idprovider_idaccess_token_urlauthorize_urlr?   access_token_methodrL    r0   r.   r    r    &   sF        '*KDBM6K R R R R Rr0   r    N)hashlibr   allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   providerr	   r6   r    adapter_viewoauth2_loginoauth2_callbackrU   r0   r.   <module>r]      s          5 5 5 5 5 5          , + + + + +  2R R R R R R R R< ,+,FGG1$12LMMr0   