U
    
W[Ú  ã                   @   sŒ   d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	 dZ
z6ddlmZmZ ee	ejƒG dd	„ d	eƒƒZeƒ ZW n ek
r†   Y nX d
S )z 
Cred plugin for ssh key login.
é    )Úabsolute_importÚdivision)Úimplementer)Úplugin)ÚICheckerFactoryz‘
This allows SSH public key authentication, based on public keys listed in
authorized_keys and authorized_keys2 files in user .ssh/ directories.
©ÚSSHPublicKeyCheckerÚUNIXAuthorizedKeysFilesc                   @   s,   e Zd ZdZdZeZdZej	Z	ddd„Z
dS )	ÚSSHKeyCheckerFactoryzL
        Generates checkers that will authenticate a SSH public key
        ZsshkeyzNo argstring required.Ú c                 C   s
   t tƒ ƒS )zÎ
            This checker factory ignores the argument string. Everything
            needed to authenticate users is pulled out of the public keys
            listed in user .ssh/ directories.
            r   )ÚselfZ	argstring© r   ú>/usr/lib/python3/dist-packages/twisted/plugins/cred_sshkeys.pyÚgenerateChecker'   s    z$SSHKeyCheckerFactory.generateCheckerN)r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ZauthTypeÚsshKeyCheckerFactoryHelpZauthHelpZargStringFormatr   ZcredentialInterfacesr   r   r   r   r   r
      s   r
   N)r   Z
__future__r   r   Zzope.interfacer   Ztwistedr   Ztwisted.cred.strcredr   r   Ztwisted.conch.checkersr   r	   ZIPluginÚobjectr
   ZtheSSHKeyCheckerFactoryÚImportErrorr   r   r   r   Ú<module>   s   

