o
    "4g4                     @   sP   d dl mZ d dlmZmZmZ g dZG dd deZeeZ	eeZ
dS )    )get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginView)
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dZdZdZdZdd ZdS )VKOAuth2Adaptervkz!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&    r8   q/var/www/html/authentication-server/venv/lib/python3.10/site-packages/allauth/socialaccount/providers/vk/views.pycomplete_login)   s   zVKOAuth2Adapter.complete_loginN)__name__
__module____qualname__provider_idaccess_token_urlauthorize_urlr,   r:   r8   r8   r8   r9   r   #   s    r   N)allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   r*   r   adapter_viewoauth2_loginoauth2_callbackr8   r8   r8   r9   <module>   s    
