%PDF- %PDF-
Direktori : /lib/python3/dist-packages/keyring/__pycache__/ |
Current File : //lib/python3/dist-packages/keyring/__pycache__/http.cpython-312.pyc |
� �e� � �8 � d Z ddlZddlmZmZmZ G d� d� Zy)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 �$ � e Zd Zd� Zd� Zd� Zd� Zy)�PasswordMgrc �* � t j � S �N)�getpass�getuser)�self�realm�authuris �./usr/lib/python3/dist-packages/keyring/http.py�get_usernamezPasswordMgr.get_username s � ���� � � c �B � | j ||� }t |||� y r )r r )r r r �password�users r �add_passwordzPasswordMgr.add_password s � �� � ���0���U�D�(�+r c � � | j ||� }t ||� }|�/dt � z }t j |� }t |||� ||fS )Nz1password for %(user)s@%(realm)s for %(authuri)s: )r r �varsr r )r r r r r �prompts r �find_user_passwordzPasswordMgr.find_user_password sV � �� � ���0����t�,����K�d�f�T�F����v�.�H����h�/��X�~�r c �@ � | j ||� }t ||� y r )r r )r r r r s r �clear_passwordzPasswordMgr.clear_password% s � �� � ���0����t�$r N)�__name__� __module__�__qualname__r r r r � r r r r s � �!�,��%r r )�__doc__r � r r r r r r r �<module>r# s ��� � 9� 9�%� %r