
    )Jf                         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 )    )get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginView   )QuestradeProviderc                   .    e Zd Zej        ZdZdZdZd Z	dS )QuestradeOAuth2Adapterz(https://login.questrade.com/oauth2/tokenz,https://login.questrade.com/oauth2/authorizeFc                    |                     di                                dd          }t                                                                           d                    |          dd                    |j                  i          }|                                 |                                }|                    |           |                                 	                    ||          S )Nresponse
api_serverzhttps://api01.iq.questrade.com/z{}v1/accountsAuthorizationz	Bearer {})headers)
getr   get_requests_sessionformattokenraise_for_statusjsonupdateget_providersociallogin_from_response)selfrequestappr   kwargsr   respdatas           r/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/allauth/socialaccount/providers/questrade/views.pycomplete_loginz%QuestradeOAuth2Adapter.complete_login   s    ZZ
B//33;
 

 MM!!##S&&z22(+*<*<U[*I*IJ    	 	yy{{F  ""<<WdKKK    N)
__name__
__module____qualname__r   idprovider_idaccess_token_urlauthorize_urlsupports_stater     r!   r   r
   r
      s@        #&KABMNL L L L Lr!   r
   N)allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   providerr   r
   adapter_viewoauth2_loginoauth2_callbackr*   r!   r   <module>r1      s    5 5 5 5 5 5          ( ' ' ' ' 'L L L L L] L L L0 ,+,BCC1$12HIIr!   