o
    LfV                     @   s\   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 deZ	e
e	Ze
e	ZdS )	    )get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginView   )
VKProvider)
first_name	last_namenicknamescreen_namesexbdatecitycountrytimezonephotophoto_medium	photo_bigphoto_max_orig
has_mobilecontacts	educationonlinecountersrelation	last_seenactivityuniversitiesc                   @   s&   e Zd ZejZdZdZdZdd Z	dS )VKOAuth2Adapterz!https://oauth.vk.com/access_tokenzhttps://oauth.vk.com/authorizez#https://api.vk.com/method/users.getc           
      K   s   |d  d}d|jdtd}|r||d< t  j | j|d}|  | d d }|d  d	}	|	r;|	|d	< | 	 
||S )
Nresponseuser_idz5.95,)vaccess_tokenfieldsuser_ids)paramsr   email)gettokenjoinUSER_FIELDSr   get_requests_sessionprofile_urlraise_for_statusjsonget_providersociallogin_from_response)
selfrequestappr)   kwargsuidr&   resp
extra_datar'    r9   i/var/www/html/humari/django-venv/lib/python3.10/site-packages/allauth/socialaccount/providers/vk/views.pycomplete_login+   s   zVKOAuth2Adapter.complete_loginN)
__name__
__module____qualname__r   idprovider_idaccess_token_urlauthorize_urlr-   r;   r9   r9   r9   r:   r   %   s    r   N)allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   providerr   r+   r   adapter_viewoauth2_loginoauth2_callbackr9   r9   r9   r:   <module>   s    
