
    )Jf,                         d dl m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
 e	j        e
          Z ej        e
          ZdS )    )app_settings)get_adapter)GiteaProvider)OAuth2AdapterOAuth2CallbackViewOAuth2LoginViewc                   ^   e Zd Zej        Zej                            ei           Z	de	v r)e	                    d          
                    d          ZndZd                    e          Zd                    e          Zd                    e          Zd                    e          Zd Zd	S )
GiteaOAuth2Adapter	GITEA_URL/zhttps://gitea.comz
{0}/api/v1z{0}/login/oauth/access_tokenz{0}/login/oauth/authorizez{0}/userc                 N   dd                     |j                  i}t                                                                          | j        |          }|                                 |                                }|                                 	                    ||          S )NAuthorizationztoken {})headers)
formattokenr   get_requests_sessiongetprofile_urlraise_for_statusjsonget_providersociallogin_from_response)selfrequestappr   kwargsr   resp
extra_datas           n/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/allauth/socialaccount/providers/gitea/views.pycomplete_loginz!GiteaOAuth2Adapter.complete_login   s    "J$5$5ek$B$BCMM..0044T5Ew4WW 	 	YY[[
  ""<<WjQQQ    N)__name__
__module____qualname__r   idprovider_idr   	PROVIDERSr   settingsrstripweb_urlr   api_urlaccess_token_urlauthorize_urlr   r     r!   r   r
   r
      s        "K%))+r::Hh,,{++22377%!!'**G5<<WEE/66w??M##G,,KR R R R Rr!   r
   N)allauth.socialaccountr   allauth.socialaccount.adapterr   .allauth.socialaccount.providers.gitea.providerr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   r
   adapter_viewoauth2_loginoauth2_callbackr.   r!   r   <module>r6      s    . . . . . . 5 5 5 5 5 5 H H H H H H         R R R R R R R R0 ,+,>??1$12DEEr!   