
    fu                         d dl Z d dlmZ d dlmZ d dlmZmZmZ  G d de      Z	 G d de      Z
 ej                  e
      Z ej                  e
      Zy)	    N)QUERY_EMAIL)OAuth)OAuthAdapterOAuthCallbackViewOAuthLoginViewc                   ,    e Zd ZdZdZeredz   neZd Zy)
TwitterAPIz'
    Verifying twitter credentials
    z;https://api.twitter.com/1.1/account/verify_credentials.jsonz?include_email=truec                 b    t        j                  | j                  | j                              }|S N)jsonloadsqueryurl)selfusers     h/var/www/cs2snipe.com/venv/lib/python3.12/site-packages/allauth/socialaccount/providers/twitter/views.pyget_user_infozTwitterAPI.get_user_info   s"    zz$**TXX./    N)__name__
__module____qualname____doc__	_base_urlr   r   r    r   r   r	   r	      s#     NI/:)+
+	Cr   r	   c                   "    e Zd ZdZdZdZdZd Zy)TwitterOAuthAdaptertwitterz+https://api.twitter.com/oauth/request_tokenz*https://api.twitter.com/oauth/access_tokenz*https://api.twitter.com/oauth/authenticatec                     t        ||j                  |j                  | j                        }|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!   sJ    GS]]CJJ@V@VW))+
  "<<WjQQr   N)r   r   r   provider_idr!   access_token_urlauthorize_urlr*   r   r   r   r   r      s!    KEC AMRr   r   )r   "allauth.socialaccount.app_settingsr   ,allauth.socialaccount.providers.oauth.clientr   +allauth.socialaccount.providers.oauth.viewsr   r   r   r	   r   adapter_viewoauth_loginoauth_callbackr   r   r   <module>r4      s[     : > 
 
R, R *n))*=>/"//0CDr   