
    f                         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                   n   e Zd ZdZej
                  j                  ei       Zej                  dd      Zej                  dd      Z	ej                  dd      Z
dj                  e      Zd	Zd
j                  ee	      Zd
j                  ee	      Zdj                  e
      Zdj                  ee      Zd Zy)ShareFileOAuth2Adapter	sharefile	SUBDOMAINsecureAPICPzsharefile.comDEFAULT_URLzhttps://secure.sharefile.comzhttps://{}.sf-api.comv3zhttps://{}.{}/oauth/tokenz{}/oauth/authorizez{}/sf/{}/Usersc                     ddj                  |j                        i}t               j                         j	                  | j
                  |      j                         }| j                         j                  ||      S )NAuthorizationz	Bearer {})headers)	formattokenr   get_requests_sessiongetprofile_urljsonget_providersociallogin_from_response)selfrequestappr   responser   
extra_datas          j/var/www/cs2snipe.com/venv/lib/python3.12/site-packages/allauth/socialaccount/providers/sharefile/views.pycomplete_loginz%ShareFileOAuth2Adapter.complete_login   sg    "K$6$6u{{$CDM!!#S!!7S3TV	 	   "<<WjQQ    N)__name__
__module____qualname__provider_idr   	PROVIDERSr   settings	subdomainapicpprovider_default_urlr   provider_default_api_urlprovider_api_versionaccess_token_urlrefresh_token_urlauthorize_urlr   r!    r"   r    r	   r	   
   s    K%%))+r:H[(3ILL/2E#<<7UV6==iH299)UK3::9eL(//0DEM")) "6KRr"   r	   N)allauth.socialaccountr   allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   r	   adapter_viewoauth2_loginoauth2_callbackr1   r"   r    <module>r8      sL    . 5 R] R8 ,++,BC1$112HIr"   