Ë
    oj_  ã                   óV   — d Z ddlmZ ddlmZ ddlmZ  ee«       G d„ d«      «       Zy)zg
Implementation of RFC2617: HTTP Digest Authentication

@see: U{http://www.faqs.org/rfcs/rfc2617.html}
é    )Úimplementer)Úcredentials)ÚICredentialFactoryc                   ó&   — e Zd ZdZdZd„ Zd„ Zd„ Zy)ÚDigestCredentialFactoryzp
    Wrapper for L{digest.DigestCredentialFactory} that implements the
    L{ICredentialFactory} interface.
    s   digestc                 ó:   — t        j                  ||«      | _        y)zN
        Create the digest credential factory that this object wraps.
        N)r   r   Údigest)ÚselfÚ	algorithmÚauthenticationRealms      ú:/usr/lib/python3/dist-packages/twisted/web/_auth/digest.pyÚ__init__z DigestCredentialFactory.__init__   s   € ô "×9Ñ9ØÐ*ó
ˆ�ó    c                 óh   — | j                   j                  |j                  «       j                  «      S )aA  
        Generate the challenge for use in the WWW-Authenticate header

        @param request: The L{IRequest} to with access was denied and for the
            response to which this challenge is being generated.

        @return: The L{dict} that can be used to generate a WWW-Authenticate
            header.
        )r	   ÚgetChallengeÚgetClientAddressÚhost)r
   Úrequests     r   r   z$DigestCredentialFactory.getChallenge#   s(   € ð �{‰{×'Ñ'¨×(@Ñ(@Ó(B×(GÑ(GÓHÐHr   c                 ó€   — | j                   j                  ||j                  |j                  «       j                  «      S )zª
        Create a L{twisted.cred.credentials.DigestedCredentials} object
        from the given response and request.

        @see: L{ICredentialFactory.decode}
        )r	   ÚdecodeÚmethodr   r   )r
   Úresponser   s      r   r   zDigestCredentialFactory.decode/   s5   € ð �{‰{×!Ñ!Ø�g—n‘n g×&>Ñ&>Ó&@×&EÑ&Eó
ð 	
r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úschemer   r   r   © r   r   r   r      s   „ ñð
 €Fò
ò
Ió	
r   r   N)r   Úzope.interfacer   Útwisted.credr   Útwisted.web.iwebr   r   r   r   r   ú<module>r"      s4   ðñ
õ 'å $Ý /ñ ÐÓ ÷%
ð %
ó !ñ%
r   