o
    €Ïš  ã                   @   s    d Z ddlZG dd„ deƒZdS )ú3Interface to handle end to end flow of U2F signing.é    Nc                   @   s(   e Zd ZdZejjfdd„Zdd„ ZdS )ÚBaseAuthenticatorr   c                 C   ó   t ‚)aÛ  Authenticates app_id with a security key.

    Executes the U2F authentication/signature flow with a security key.

    Args:
      app_id: The app_id to register the security key against.
      challenge_data: List of dictionaries containing a RegisteredKey ('key')
        and the raw challenge data ('challenge') for this key.
      print_callback: Callback to print a message to the user. The callback
        function takes one argument--the message to display.

    Returns:
      A dictionary with the following fields:
        'clientData': url-safe base64 encoded ClientData JSON signed by the key.
        'signatureData': url-safe base64 encoded signature.
        'applicationId': application id.
        'keyHandle': url-safe base64 encoded handle of the key used to sign.

    Raises:
      U2FError: There was some kind of problem with registration (e.g.
        the device was already registered or there was a timeout waiting
        for the test of user presence).
    ©ÚNotImplementedError)ÚselfÚapp_idÚchallenge_dataÚprint_callback© r   úL/tmp/google-cloud-sdk/lib/third_party/pyu2f/convenience/baseauthenticator.pyÚAuthenticate   s   zBaseAuthenticator.Authenticatec                 C   r   )zôIndicates whether the authenticator implementation is available to sign.

    The caller should not call Authenticate() if IsAvailable() returns False

    Returns:
      True if the authenticator is available to sign and False otherwise.

    r   )r   r   r   r   ÚIsAvailable1   s   	zBaseAuthenticator.IsAvailableN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚsysÚstderrÚwriter   r   r   r   r   r   r      s
    
ÿr   )r   r   Úobjectr   r   r   r   r   Ú<module>   s   