HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/keyring/__pycache__/credentials.cpython-310.pyc
o

���a9�@sHddlZddlZGdd�dejd�ZGdd�de�ZGdd�de�ZdS)	�Nc@s,eZdZdZejdd��Zejdd��ZdS)�
Credentialz$Abstract class to manage credentialscC�dS�N���selfrr�5/usr/lib/python3/dist-packages/keyring/credentials.py�username�zCredential.usernamecCrrrrrrr�passwordr
zCredential.passwordN)�__name__�
__module__�__qualname__�__doc__�abc�abstractpropertyr	rrrrrrs
r)�	metaclassc@s0eZdZdZdd�Zedd��Zedd��ZdS)	�SimpleCredentialz!Simple credentials implementationcC�||_||_dSr)�	_username�	_password)rr	rrrr�__init__�
zSimpleCredential.__init__cC�|jSr)rrrrrr	�zSimpleCredential.usernamecCrr)rrrrrrrzSimpleCredential.passwordN)rr
rrr�propertyr	rrrrrrs
rc@sJeZdZdZdd�Zdedefdd�Zdd	�Ze	d
d��Z
e	dd
��ZdS)�EnvironCredentialaA
    Source credentials from environment variables.

    Actual sourcing is deferred until requested.

    Supports comparison by equality.

    >>> e1 = EnvironCredential('a', 'b')
    >>> e2 = EnvironCredential('a', 'b')
    >>> e3 = EnvironCredential('a', 'c')
    >>> e1 == e2
    True
    >>> e2 == e3
    False
    cCrr)�user_env_var�pwd_env_var)rrrrrrr2rzEnvironCredential.__init__�other�returncCst|�t|�kSr)�vars)rrrrr�__eq__6szEnvironCredential.__eq__cCs tj�|�}|std|��|S)z&Helper to read an environment variablezMissing environment variable:%s)�os�environ�get�
ValueError)r�env_var�valuerrr�_get_env9szEnvironCredential._get_envcC�|�|j�Sr)r)rrrrrr	@�zEnvironCredential.usernamecCr*r)r)rrrrrrDr+zEnvironCredential.passwordN)rr
rrr�object�boolr"r)rr	rrrrrr!s
r)r#r�ABCMetarrrrrrr�<module>s