o
    ¹i†  ã                   @   sH   d dl mZ d dl mZ d dlmZ G dd„ deƒZG dd„ deƒZdS )	é   )Úparse_authorization_header)Úparse_www_authenticate_header)Úcached_propertyc                   @   ó   e Zd ZdZedd„ ƒZdS )ÚAuthorizationMixinz­Adds an :attr:`authorization` property that represents the parsed
    value of the `Authorization` header as
    :class:`~werkzeug.datastructures.Authorization` object.
    c                 C   s   | j  d¡}t|ƒS )z*The `Authorization` object in parsed form.ÚHTTP_AUTHORIZATION)ÚenvironÚgetr   )ÚselfÚheader© r   úQ/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/werkzeug/wrappers/auth.pyÚauthorization   s   z AuthorizationMixin.authorizationN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s    r   c                   @   r   )ÚWWWAuthenticateMixinz>Adds a :attr:`www_authenticate` property to a response object.c                    s"   ‡ fdd„}ˆ j  d¡}t||ƒS )z/The `WWW-Authenticate` header in a parsed form.c                    s4   | sdˆ j v rˆ j d= d S | r|  ¡ ˆ j d< d S d S )Núwww-authenticatezWWW-Authenticate)ÚheadersÚ	to_header)Úwww_auth©r
   r   r   Ú	on_update   s
   ÿz8WWWAuthenticateMixin.www_authenticate.<locals>.on_updater   )r   r	   r   )r
   r   r   r   r   r   Úwww_authenticate   s   
z%WWWAuthenticateMixin.www_authenticateN)r   r   r   r   Úpropertyr   r   r   r   r   r      s    r   N)Úhttpr   r   Úutilsr   Úobjectr   r   r   r   r   r   Ú<module>   s
    