%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/twisted/web/_auth/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/twisted/web/_auth/__pycache__/basic.cpython-312.pyc

�

Ϫ�f^��b�dZddlZddlmZddlmZmZddlmZee�Gd�d��Z	y)z�
HTTP BASIC authentication.

@see: U{http://tools.ietf.org/html/rfc1945}
@see: U{http://tools.ietf.org/html/rfc2616}
@see: U{http://tools.ietf.org/html/rfc2617}
�N)�implementer)�credentials�error)�ICredentialFactoryc�&�eZdZdZdZd�Zd�Zd�Zy)�BasicCredentialFactoryz�
    Credential Factory for HTTP Basic Authentication

    @type authenticationRealm: L{bytes}
    @ivar authenticationRealm: The HTTP authentication realm which will be issued in
        challenges.
    sbasicc��||_y)N��authenticationRealm)�selfrs  �9/usr/lib/python3/dist-packages/twisted/web/_auth/basic.py�__init__zBasicCredentialFactory.__init__"s
��#6�� �c��d|jiS)zy
        Return a challenge including the HTTP authentication realm with which
        this factory was created.
        �realmr
)r�requests  r
�getChallengez#BasicCredentialFactory.getChallenge%s��
��1�1�2�2rc��	tj|dz�}|jdd�}t
|�dk(rtj|�Stjd��#tj$rtjd��wxYw)z�
        Parse the base64-encoded, colon-separated username and password into a
        L{credentials.UsernamePassword} instance.
        s===zInvalid credentials�:��)	�binascii�
a2b_base64�Errorr�LoginFailed�split�lenr�UsernamePassword)r�responser�credss    r
�decodezBasicCredentialFactory.decode,s���
	;��'�'��6�(9�:�E����D�!�$���u�:��?��/�/��7�7��#�#�$9�:�:���~�~�	;��#�#�$9�:�:�	;�s�A!�!)B
N)�__name__�
__module__�__qualname__�__doc__�schemerrr!�rr
rrs����F�7�3�;rr)
r%r�zope.interfacer�twisted.credrr�twisted.web.iwebrrr'rr
�<module>r+s7��
��&�+�/�
�
� �#;�#;�!�#;r

Zerion Mini Shell 1.0