o
    h                     @   sH   d dl mZ d dlmZmZmZ G dd deZeeZeeZ	dS )    )get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginViewc                   @   s(   e Zd ZdZdZdZdZdZdd ZdS )	DisqusOAuth2Adapterdisqusz.https://disqus.com/api/oauth/2.0/access_token/z+https://disqus.com/api/oauth/2.0/authorize/z-https://disqus.com/api/3.0/users/details.json,c                 K   sN   t   j| j|j|j|jdd}|  | d}| 	 
||}|S )N)access_tokenapi_key
api_secret)paramsresponse)r   get_requests_sessiongetprofile_urltoken	client_idsecretraise_for_statusjsonget_providersociallogin_from_response)selfrequestappr   kwargsresp
extra_datalogin r   c/var/www/html/pos/venv/lib/python3.10/site-packages/allauth/socialaccount/providers/disqus/views.pycomplete_login   s   z"DisqusOAuth2Adapter.complete_loginN)	__name__
__module____qualname__provider_idaccess_token_urlauthorize_urlr   scope_delimiterr!   r   r   r   r    r   	   s    r   N)
allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   r   adapter_viewoauth2_loginoauth2_callbackr   r   r   r    <module>   s
    
