
    )Jfw                         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 de          Z
 ej        e
          Z ej        e
          ZdS )	    )app_settings)get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginView   )RedditProviderc                       e Zd Zej        ZdZdZdZdZ	e
j                            ei           Zde                    dd          iZd Zd	S )
RedditAdapterz*https://www.reddit.com/api/v1/access_tokenz'https://www.reddit.com/api/v1/authorizez"https://oauth.reddit.com/api/v1/meTz
User-Agent
USER_AGENTzdjango-allauth-headerc                 p   dd|j         z   i}|                    | j                   t                                                                          | j        |          }t          |t                    r|d         }| 	                                
                    ||                                          S )NAuthorizationzbearer )headersr   )tokenupdater   r   get_requests_sessiongetprofile_url
isinstancelistget_providersociallogin_from_responsejson)selfrequestappr   kwargsr   
extra_datas          o/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/allauth/socialaccount/providers/reddit/views.pycomplete_loginzRedditAdapter.complete_login   s    "I$;<t|$$$MM..0044T5Ew4WW 	
 j$'' 	'#AJ  ""<<WjooFWFWXXX    N)__name__
__module____qualname__r	   idprovider_idaccess_token_urlauthorize_urlr   
basic_authr   	PROVIDERSr   settingsr   r     r!   r   r   r      sv         #KC=M6KJ%))+r::HX\\,8OPPQGY Y Y Y Yr!   r   N)allauth.socialaccountr   allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   providerr	   r   adapter_viewoauth2_loginoauth2_callbackr,   r!   r   <module>r4      s    . . . . . . 5 5 5 5 5 5          % $ $ $ $ $Y Y Y Y YM Y Y Y2 ,+M::1$1-@@r!   