HEX
Server: nginx/1.24.0
System: Linux ip-10-50-20-85 6.5.0-1022-aws #22~22.04.1-Ubuntu SMP Fri Jun 14 16:31:00 UTC 2024 x86_64
User: usefuloffices.org (1001)
PHP: 8.1.2-1ubuntu2.23
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