| Server IP : 195.114.193.97 / Your IP : 216.73.217.93 Web Server : LiteSpeed System : Linux host 5.15.0-126-generic #136-Ubuntu SMP Wed Nov 6 10:38:22 UTC 2024 x86_64 User : sembi4241 ( 1126) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/keyring/__pycache__/ |
Upload File : |
o
���a� � @ s2 d Z ddlZddlmZmZmZ G dd� d�ZdS )a�
urllib2.HTTPPasswordMgr object using the keyring, for use with the
urllib2.HTTPBasicAuthHandler.
usage:
import urllib2
handlers = [urllib2.HTTPBasicAuthHandler(PasswordMgr())]
urllib2.install_opener(handlers)
urllib2.urlopen(...)
This will prompt for a password if one is required and isn't already
in the keyring. Then, it adds it to the keyring for subsequent use.
� N� )�get_password�delete_password�set_passwordc @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S )
�PasswordMgrc C s t �� S �N)�getpass�getuser)�self�realm�authuri� r
�./usr/lib/python3/dist-packages/keyring/http.py�get_username s zPasswordMgr.get_usernamec C s | � ||�}t|||� d S r )r r )r
r r �password�userr
r
r �add_password s zPasswordMgr.add_passwordc C sF | � ||�}t||�}|d u rdt� }t�|�}t|||� ||fS )Nz1password for %(user)s@%(realm)s for %(authuri)s: )r r �varsr r )r
r r r r �promptr
r
r �find_user_password s
zPasswordMgr.find_user_passwordc C s | � ||�}t||� d S r )r r )r
r r r r
r
r �clear_password% s zPasswordMgr.clear_passwordN)�__name__�
__module__�__qualname__r r r r r
r
r
r r s
r )�__doc__r � r r r r r
r
r
r �<module> s