U
vf, @ s d Z ddlmZ ddlmZ ddlmZ ddlmZ G dd dZ G d d
d
e Z
G dd de ZG d
d de ZG dd deZ
G dd deZedddgZG dd deZG dd deZG dd dZdS )z
Modern, adaptable authentication machinery.
Replaces certain parts of `.SSHClient`. For a concrete implementation, see the
``OpenSSHAuthStrategy`` class in `Fabric `_.
)
namedtuple )AgentKey)
get_logger)AuthenticationExceptionc @ s0 e Zd ZdZdd Zdd Zdd Zdd Zd
S )
AuthSourcez
Some SSH authentication source, such as a password, private key, or agent.
See subclasses in this module for concrete implementations.
All implementations must accept at least a ``username`` (``str``) kwarg.
c C s
|| _ d S Nusername)selfr
r G/opt/alt/python38/lib/python3.8/site-packages/paramiko/auth_strategy.py__init__ s zAuthSource.__init__c K s0 dd | D }d|}| jj d| dS )Nc S s g | ]\}}| d |qS )=r ).0kvr r r
s z$AuthSource._repr..z, ())itemsjoin __class____name__)r kwargspairsZjoinedr r r
_repr s
zAuthSource._reprc C s | S r )r r r r r
__repr__" s zAuthSource.__repr__c C s t dS )z)
Perform authentication.
NNotImplementedErrorr transportr r r
authenticate% s zAuthSource.authenticateN)r
__module____qualname____doc__r r r r# r r r r
r s
r c @ s e Zd ZdZdd ZdS )NoneAuthzS
Auth type "none", ie https://www.rfc-editor.org/rfc/rfc4252#section-5.2 .
c C s | | jS r )Z auth_noner
r! r r r
r# 1 s zNoneAuth.authenticateNr r$ r% r&