
    )Jf                         d dl Z 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 G d	 d
e          Z ej        e          Z ej        e          ZdS )    N)QUERY_EMAIL)OAuth)OAuthAdapterOAuthCallbackViewOAuthLoginView   )TwitterProviderc                   .    e Zd ZdZdZeredz   neZd ZdS )
TwitterAPIz'
    Verifying twitter credentials
    z;https://api.twitter.com/1.1/account/verify_credentials.jsonz?include_email=truec                 ^    t          j        |                     | j                            }|S N)jsonloadsqueryurl)selfusers     p/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/allauth/socialaccount/providers/twitter/views.pyget_user_infozTwitterAPI.get_user_info   s$    z$**TX..//    N)__name__
__module____qualname____doc__	_base_urlr   r   r    r   r   r   r      sJ          NI/:
I)+
+
+	C    r   r   c                   .    e Zd Zej        ZdZdZdZd Z	dS )TwitterOAuthAdapterz+https://api.twitter.com/oauth/request_tokenz*https://api.twitter.com/oauth/access_tokenz*https://api.twitter.com/oauth/authenticatec                     t          ||j        |j        | j                  }|                                }|                                                     ||          S r   )r   	client_idsecretrequest_token_urlr   get_providersociallogin_from_response)r   requestapptokenresponseclient
extra_datas          r   complete_loginz"TwitterOAuthAdapter.complete_login#   sO    GS]CJ@VWW))++
  ""<<WjQQQr   N)
r   r   r   r	   idprovider_idr"   access_token_urlauthorize_urlr+   r   r   r   r   r      sD        !$KEC AMR R R R Rr   r   )r   "allauth.socialaccount.app_settingsr   ,allauth.socialaccount.providers.oauth.clientr   +allauth.socialaccount.providers.oauth.viewsr   r   r   providerr	   r   r   adapter_viewoauth_loginoauth_callbackr   r   r   <module>r7      s    : : : : : : > > > > > >          & % % % % %
 
 
 
 
 
 
 
R R R R R, R R R *n)*=>>/"/0CDDr   