o
    &zh[                     @   s   d dl mZ d dlmZ d dlmZmZmZ ddddddd	Ze	ed
i 
di 
ddZee d Zee d ZG dd deZeeZeeZdS )    )settings)get_adapter)OAuth2AdapterOAuth2CallbackViewOAuth2LoginViewz,https://www.dwolla.com/oauth/v2/authenticatez%https://www.dwolla.com/oauth/v2/token)auth_url	token_urlz,https://uat.dwolla.com/oauth/v2/authenticatez%https://uat.dwolla.com/oauth/v2/token)
productionsandboxSOCIALACCOUNT_PROVIDERSdwollaENVIRONMENTr	   r   r   c                   @   s(   e Zd ZdZdZdZeZeZ	dd Z
dS )DwollaOAuth2AdapterzDwolla Views Adapter|r   c                 K   sD   t   j|d d d d|j ddd}| }|  ||S )N_linksaccounthrefz	Bearer %sz"application/vnd.dwolla.v1.hal+json)authorizationaccept)headers)r   get_requests_sessiongettokenjsonget_providersociallogin_from_response)selfrequestappr   responsekwargsresp
extra_data r#   g/var/www/html/kangema/venv/lib/python3.10/site-packages/allauth/socialaccount/providers/dwolla/views.pycomplete_login)   s   z"DwollaOAuth2Adapter.complete_loginN)__name__
__module____qualname____doc__scope_delimiterprovider_id	TOKEN_URLaccess_token_urlAUTH_URLauthorize_urlr%   r#   r#   r#   r$   r       s    r   N)django.confr   allauth.socialaccount.adapterr   ,allauth.socialaccount.providers.oauth2.viewsr   r   r   ENVIRONMENTSgetattrr   ENVr.   r,   r   adapter_viewoauth2_loginoauth2_callbackr#   r#   r#   r$   <module>   s&    	

