| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.7/site-packages/pip/_internal/network/__pycache__/ |
Upload File : |
B
�N�a�/ �
@ s* d Z ddlZddlmZmZmZmZmZ ddl m
Z
mZ ddlm
Z
mZ ddlmZ ddlmZ ddlmZmZmZmZmZ dd lmZ ee�Zeeeef ZyddlaW nL e k
r� daY n6 e!k
r� Z" ze�#d
ee"�� daW ddZ"["X Y nX ee ee ee d�dd
�Z$G dd� de
�Z%dS )z�Network Authentication Helpers
Contains interface (MultiDomainBasicAuth) and associated glue code for
providing credentials in the context of network requests.
� N)�Any�Dict�List�Optional�Tuple)�AuthBase�
HTTPBasicAuth)�Request�Response)�get_netrc_auth)� getLogger)�ask� ask_input�ask_password�remove_auth_from_url�split_auth_netloc_from_url)�AuthInfoz*Keyring is skipped due to an exception: %s)�url�username�returnc
C s� | rt sdS yzy
t j}W n tk
r, Y n0X t�d| � || |�}|dk rX|j|jfS dS |r�t�d| � t �| |�}|r�||fS W n6 tk
r� } zt� dt
|�� da W dd}~X Y nX dS )z3Return the tuple auth for a given url from keyring.Nz'Getting credentials from keyring for %sz$Getting password from keyring for %sz*Keyring is skipped due to an exception: %s)�keyring�get_credential�AttributeError�logger�debugr �passwordZget_password� Exception�warning�str)r r r Zcredr �exc� r �>/usr/lib/python3.7/site-packages/pip/_internal/network/auth.py�get_keyring_auth( s.
r"