o
    »viö  ã                   @   s*  d dl Z d dlZddlmZ 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jj¡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
   úL/home/air/biblejyuku/back/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Úparse_stringÚppÚParseExceptionr   Úas_dict)Ú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>9   s    
ýÿýz+_parse_www_authenticate.<locals>.<dictcomp>)r   r   Úwww_authenticater   r   r   r   )r   r   r   r   Úretvalr
   r
   r   Ú_parse_www_authenticate.   s   þür'   )r   )r    )&ÚreÚ	pyparsingr   Úerrorr   Úcompiler   ÚunquoteÚnumsÚalphasÚtcharÚWordÚset_namer   ÚCombineÚOptionalÚleave_whitespacer   Údbl_quoted_stringÚcopyÚset_parse_actionÚquoted_stringÚadd_parse_actionÚcommonÚdowncase_tokensÚauth_param_nameÚSuppressÚ
auth_paramÚDictÚDelimitedListÚGroupr   r   r#   r   r%   r   r'   r
   r
   r
   r   Ú<module>   s(    
0ÿ
