
    fk                         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)    )get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginViewc                   "    e Zd ZdZdZdZdZd Zy)StackExchangeOAuth2Adapterstackexchangez,https://stackexchange.com/oauth/access_tokenzhttps://stackexchange.com/oauthz$https://api.stackexchange.com/2.1/mec                 d   | j                         }|j                         }t               j                         j	                  | j
                  |j                  |j                  |d      }|j                          |j                         d   d   }| j                         j                  ||      S )N)access_tokenkeysite)paramsitemsr   )get_providerget_siter   get_requests_sessiongetprofile_urltokenr   raise_for_statusjsonsociallogin_from_response)	selfrequestappr   kwargsproviderr   resp
extra_datas	            n/var/www/cs2snipe.com/venv/lib/python3.12/site-packages/allauth/socialaccount/providers/stackexchange/views.pycomplete_loginz)StackExchangeOAuth2Adapter.complete_login   s    $$&  "M!!#S  (-CGGTR   	 	YY[)!,
  "<<WjQQ    N)__name__
__module____qualname__provider_idaccess_token_urlauthorize_urlr   r!    r"   r    r   r   	   s    !KE5M8KRr"   r   N)
allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   r   adapter_viewoauth2_loginoauth2_callbackr)   r"   r    <module>r/      sI    5 R R, ,++,FG1$112LMr"   