OwlCyberSecurity - MANAGER
Edit File: auth.pyc
� �Rec�����������@���st��d��Z��d�d�l�Z�d�d�l�m�Z�m�Z�d�d�l�m�Z�d�d�l�m�Z �d�d�l �m�Z�m�Z�m �Z �m�Z�m�Z�d�d�l�m�Z�e�r��d�d�l�m�Z�m�Z�m�Z�m�Z�m�Z�d�d �l�m�Z�d�d �l�m�Z�m�Z�e�e�e�e�f�Z�n��e�j�e ���Z!�y�d�d�l"�a"�WnE�e#�k �r"d�a"�n/�e%�k �rPZ&�e!�j'�d�e�e&�����d�a"�n�Xd����Z(�d �e�f�d�������YZ)�d�S(���s����Network Authentication Helpers Contains interface (MultiDomainBasicAuth) and associated glue code for providing credentials in the context of network requests. i����N(���t���AuthBaset ���HTTPBasicAuth(���t���get_netrc_auth(���t���parse(���t���askt ���ask_inputt���ask_passwordt���remove_auth_from_urlt���split_auth_netloc_from_url(���t���MYPY_CHECK_RUNNING(���t���Dictt���Optionalt���Tuplet���Listt���Any(���t���AuthInfo(���t���Responset���Requests*���Keyring is skipped due to an exception: %sc���������C���s����|��s�t��r�d�Sy��y �t��j�}�Wn�t�k �r5�n@�Xt�j�d�|����|�|��|���}�|�d�k �rq�|�j�|�j�f�Sd�S|�r��t�j�d�|����t��j�|��|���}�|�r��|�|�f�Sn��Wn/�t �k �r��}�t�j �d�t�|�����d�a��n�Xd�S(���s3���Return the tuple auth for a given url from keyring.s'���Getting credentials from keyring for %ss$���Getting password from keyring for %ss*���Keyring is skipped due to an exception: %sN(���t���keyringt���Nonet���get_credentialt���AttributeErrort���loggert���debugt���usernamet���passwordt���get_passwordt ���Exceptiont���warningt���str(���t���urlR���R���t���credR���t���exc(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyt���get_keyring_auth,���s,���� t���MultiDomainBasicAuthc�����������B���sn���e��Z�e�d �d����Z�d����Z�e�e�d���Z�d����Z�d����Z�d����Z �d����Z �d����Z�d����Z�d ����Z �RS(���c���������C���s(���|�|��_��|�|��_�i��|��_�d��|��_�d��S(���N(���t ���promptingt ���index_urlst ���passwordsR���t���_credentials_to_save(���t���selfR#���R$���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyt���__init__O���s���� c���������C���sY���|�s�|��j��r�d�Sx=�|��j��D]2�}�t�|���j�d���d�}�|�j�|���r�|�Sq�Wd�S(���s���Return the original index URL matching the requested URL. Cached or dynamically generated credentials may work against the original index URL rather than just the netloc. The provided url should have had its username and password removed already. If the original index url had credentials then they will be included in the return value. Returns None if no matching index was found, or if --no-index was specified by the user. t���/N(���R$���R���R���t���rstript ���startswith(���R'���R���t���ut���prefix(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyt���_get_index_url[���s����c���������C���sd��t��|���\�}�}�}�|�\�}�}�|�d�k �rM�|�d�k �rM�t�j�d�|���|�S|��j�|���} �| �r��t��| ���} �| �r��| �\�} �}�}�t�j�d�| ���q��n��| �r��|�d�d�k �r��|�\�}�}�|�d�k �r��|�d�k �r��t�j�d�|���|�Sn��|�rt�|���} �| �rt�j�d�|���| �Sn��|�rZt�| �|���p:t�|�|���}�|�rZt�j�d�|���|�Sn��|�|�f�S(���s2���Find and return credentials for the specified URL.s���Found credentials in url for %ss���Found index url %si����s%���Found credentials in index url for %ss!���Found credentials in netrc for %ss#���Found credentials in keyring for %sN(���R���R���R���R���R.���R���R!���(���R'���t���original_urlt���allow_netrct ���allow_keyringR���t���netloct���url_user_passwordR���R���t ���index_urlt ���index_infot���_t���index_url_user_passwordt ���netrc_autht���kr_auth(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyt���_get_new_credentialsr���s:����c���������C���s����t��|���\�}�}�}�|��j�j�|�d���\�}�}�|�d�k�r`�|�d�k�r`�|��j�|���\�}�}�n��|�d�k �sx�|�d�k �r��|�p��d�}�|�p��d�}�|�|�f�|��j�|�<n��|�d�k �r��|�d�k �s��|�d�k�r��|�d�k�s��t�d�j�|�������|�|�|�f�S(���s_��Return the credentials to use for the provided URL. If allowed, netrc and keyring may be used to obtain the correct credentials. Returns (url_without_credentials, username, password). Note that even if the original URL contains credentials, this function may return a different username and password. t����s'���Could not load credentials from url: {}N(���NN(���R���R%���t���getR���R:���t���AssertionErrort���format(���R'���R/���R���R2���R6���R���R���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyt���_get_url_and_credentials����s����c���������C���sk���|��j��|�j���\�}�}�}�|�|�_�|�d��k �rT�|�d��k �rT�t�|�|���|���}�n��|�j�d�|��j���|�S(���Nt���response(���R?���R���R���R���t ���register_hookt ���handle_401(���R'���t���reqR���R���R���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyt���__call__����s���� c���������C���s����t��d�j�|�����}�|�s(�d��d��t�f�St�|�|���}�|�rr�|�d�d��k �rr�|�d�d��k �rr�|�d�|�d�t�f�St�d���}�|�|�t�f�S(���Ns ���User for {}: i����i���s ���Password: (���R���R>���R���t���FalseR!���R���t���True(���R'���R2���R���t���authR���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyt���_prompt_for_password����s���� &c���������C���s#���t��s �t�St�d�d�d�g���d�k�S(���Ns#���Save credentials to keyring [y/N]: t���yt���n(���R���RE���R���(���R'���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyt ���_should_save_password_to_keyring����s����c��� ������K���sD��|�j��d�k�r�|�S|��j�s �|�St�j�|�j���}�|��j�|�j���\�}�}�}�d��|��_�|�d��k �r��|�d��k �r��|�|�f�|��j �|�j�<|�r��|��j ����r��|�j�|�|�f�|��_�q��n��|�j�|�j�j ����t�|�p��d�|�p��d���|�j���}�|�j�d�|��j���|��j�r|�j�d�|��j���n��|�j�j�|�|���}�|�j�j�|���|�S(���Ni���R;���R@���(���t���status_codeR#���t���urllib_parset���urlparseR���RH���R2���R���R&���R%���RK���t���contentt���rawt���release_connR���t���requestRA���t���warn_on_401t���save_credentialst ���connectiont���sendt���historyt���append( ���R'���t���respt���kwargst���parsedR���R���t���saveRC���t���new_resp(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyRB�������s(���� $ c���������K���s,���|�j��d�k�r(�t�j�d�|�j�j���n��d�S(���s6���Response callback to warn about incorrect credentials.i���s)���401 Error, Credentials not correct for %sN(���RL���R���R���RR���R���(���R'���RY���RZ���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyRS��� ��s����c���������K���s����t��d�k �s�t�d�����t��s"�d�S|��j�}�d�|��_�|�r��|�j�d�k��r��y�t�j�d���t��j�|����Wq��t�k �r��t�j �d���q��Xn��d�S(���s1���Response callback to save credentials on success.s'���should never reach here without keyringNi���s���Saving credentials to keyrings���Failed to save credentials( ���R���R���R=���R&���RL���R���t���infot���set_passwordR���t ���exception(���R'���RY���RZ���t���creds(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyRT���(��s���� N(���t���__name__t ���__module__RF���R���R(���R.���R:���R?���RD���RH���RK���RB���RS���RT���(����(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyR"���M���s��� 2 ) . (*���t���__doc__t���loggingt���pip._vendor.requests.authR����R���t���pip._vendor.requests.utilsR���t���pip._vendor.six.moves.urllibR���RM���t���pip._internal.utils.miscR���R���R���R���R���t���pip._internal.utils.typingR ���t���typingR ���R���R���R ���R���t ���pip._internal.vcs.versioncontrolR���t���pip._vendor.requests.modelsR���R���R���t���Credentialst ���getLoggerRb���R���R���t���ImportErrorR���R���R ���R���R!���R"���(����(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/auth.pyt���<module>���s,���(( !