
    fH                         d dl mZ d dlmZ d dlmZmZmZ  G d de      Z ej                  e      Z
 ej                  e      Zy)    )app_settings)get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginViewc                       e Zd ZdZdZdZdZdZej                  j                  ei       Zdej                  dd      iZd	 Zy
)RedditAdapterredditz*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                 F   dd|j                   z   i}|j                  | j                         t               j	                         j                  | j                  |      }t        |t              r|d   }| j                         j                  ||j                               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          g/var/www/cs2snipe.com/venv/lib/python3.12/site-packages/allauth/socialaccount/providers/reddit/views.pycomplete_loginzRedditAdapter.complete_login   s    "I$;<t||$M..044T5E5Ew4W 	
 j$'#AJ  "<<WjooFWXX    N)__name__
__module____qualname__provider_idaccess_token_urlauthorize_urlr   
basic_authr   	PROVIDERSr   settingsr   r    r    r   r	   r	   
   sP    KC=M6KJ%%))+r:HX\\,8OPQGYr    r	   N)allauth.socialaccountr   allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   r	   adapter_viewoauth2_loginoauth2_callbackr*   r    r   <module>r1      sJ    . 5 YM Y2 ,++M:1$11-@r    