o
    7 ¾hb  ã                   @   sL  d dl Z d dlZddlmZ zejjZW n ey    ejZY nw e  d¡Z	dd„ Z
dej ej Ze e¡ d¡Ze e d	ej ej ¡e e d
¡ ¡ ¡ ¡ d¡Zej ¡  d¡ e
¡Ze ¡  d¡ e¡Zee d
¡ eeB  Ze e e e¡¡¡Z edƒZ!e!e dƒedƒB  Z"e  ¡ Z#e e e"¡¡Z$ddd„Z%ddd„Z&dS )é    Né   )ÚMalformedHeaderz\\(.)c                 C   s   t  d|d dd… ¡S )Nz\1r   r   éÿÿÿÿ)ÚUNQUOTE_PAIRSÚsub)ÚsÚ_Út© r
   úU/var/www/html/figdemos/bartoux_crm/venv/lib/python3.10/site-packages/httplib2/auth.pyÚ<lambda>   s    r   z!#$%&'*+-.^_`|~Útokenz-._~+/Ú=Útoken68zquoted-stringzauth-param-nameÚschemeÚparamsúauthentication-infoc                 C   sF   |   |d¡ ¡ }|si S z
t |¡}W | ¡ S  tjy"   t|ƒ‚w )z(https://tools.ietf.org/html/rfc7615
    Ú )ÚgetÚstripÚauthentication_infoÚparseStringÚppÚParseExceptionr   ÚasDict)ÚheadersÚ
headernameÚheaderÚparsedr
   r
   r   Ú_parse_authentication_info$   s   üþr   úwww-authenticatec                 C   sR   |   |d¡ ¡ }|si S zt |¡}W n tjy   t|ƒ‚w dd„ |D ƒ}|S )z?Returns a dictionary of dictionaries, one dict per auth_scheme.r   c                 S   s8   i | ]}|d    ¡ d|v r|d  ¡ nd| d¡i“qS )r   r   r   )Úlowerr   r   )Ú.0Ú	challenger
   r
   r   Ú
<dictcomp>>   s    
ýÿýz+_parse_www_authenticate.<locals>.<dictcomp>)r   r   Úwww_authenticater   r   r   r   )r   r   r   r   Úretvalr
   r
   r   Ú_parse_www_authenticate3   s   þür'   )r   )r    )'ÚreZ	pyparsingr   Úerrorr   ÚcommonZdowncaseTokensÚAttributeErrorÚcompiler   ÚunquoteZnumsZalphasZtcharZWordÚsetNamer   ZCombineÚOptionalZleaveWhitespacer   ZdblQuotedStringÚcopyZsetParseActionZquoted_stringZaddParseActionZauth_param_nameZSuppressZ
auth_paramÚDictZdelimitedListÚGroupr   r   r#   r   r%   r   r'   r
   r
   r
   r   Ú<module>   s2    
ÿ
0ÿ
