U
    [!c                     @   s   d dl Z d dlmZmZmZ ddlmZ ddddd	d
ddddddddddddddddgZG dd deZe	eZ
e	eZdS )    N)OAuth2AdapterOAuth2CallbackViewOAuth2LoginView   )
VKProviderZ
first_name	last_nameZnicknameZscreen_nameZsexZbdateZcityZcountrytimezoneZphotoZphoto_mediumZ	photo_bigZphoto_max_origZ
has_mobileZcontactsZ	educationZonlineZcountersZrelationZ	last_seenZactivityZ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	}	|	rp|	|d	< |  	||S )
NresponseZuser_idz5.95,)vZaccess_tokenfieldsZuser_ids)paramsr   email)
gettokenjoinUSER_FIELDSrequestsprofile_urlZraise_for_statusjsonget_providerZsociallogin_from_response)
selfrequestZappr   kwargsuidr   Zresp
extra_datar    r   l/var/www/html/crackeverytest/cet_env/lib/python3.8/site-packages/allauth/socialaccount/providers/vk/views.pycomplete_login,   s    zVKOAuth2Adapter.complete_loginN)
__name__
__module____qualname__r   idZprovider_idZaccess_token_urlZauthorize_urlr   r   r   r   r   r   r	   &   s
   r	   )r   Z,allauth.socialaccount.providers.oauth2.viewsr   r   r   Zproviderr   r   r	   Zadapter_viewZoauth2_loginZoauth2_callbackr   r   r   r   <module>   s8   
