
    qh                     6    S r SSKJr  SSKJr   " S S\5      rg)zG
NGP VAN's `ActionID` Provider

http://developers.ngpvan.com/action-id
    )ax   )
OpenIdAuthc                   4    \ rS rSrSrSrSrSrS rS
S jr	S	r
g)ActionIDOpenID   z6
NGP VAN's ActionID OpenID 1.1 authentication backend
zactionid-openidz%https://accounts.ngpvan.com/Home/Xrdsemailc                 
    / SQ$ )zl
Return the AX attributes that ActionID responds with, as well as the
user data result that it must map to.
))/http://openid.net/schema/contact/internet/emailr	   )/http://openid.net/schema/contact/phone/businessphone))http://openid.net/schema/namePerson/first
first_name)(http://openid.net/schema/namePerson/last	last_name)z#http://openid.net/schema/namePersonfullname )selfs    M/var/www/html/env/lib/python3.13/site-packages/social_core/backends/ngpvan.pyget_ax_attributes ActionIDOpenID.get_ax_attributes   s    

 	
    Nc                    U R                  U5      n[        R                  " 5       nUR                  [        R                  " SSSS95        UR                  [        R                  " SSSS95        UR                  [        R                  " SS	SS95        UR                  [        R                  " S
SSS95        UR                  U5        U$ )z
Setup the OpenID request

Because ActionID does not advertise the availability of AX attributes
nor use standard attribute aliases, we need to setup the attributes
manually instead of rely on the parent OpenIdAuth.setup_request()
r   ngpvanemailT)aliasrequiredr   ngpvanphoneFr   ngpvanfirstnamer   ngpvanlastname)openid_requestr   FetchRequestaddAttrInfoaddExtension)r   paramsrequestfetch_requests       r   setup_requestActionIDOpenID.setup_request"   s     %%f-)KKA#	
 	KKA#	
 	KK;'	
 	KK:&	
 	]+r   r   )N)__name__
__module____qualname____firstlineno____doc__nameURLUSERNAME_KEYr   r(   __static_attributes__r   r   r   r   r      s"     D
1CL
*r   r   N)r.   openid.extensionsr   open_idr   r   r   r   r   <module>r5      s     ! @Z @r   