o
    6a                     @   sx   d Z ddlZddlmZ ddlZddlmZ ddlm	Z	 e
eZG dd dejZG dd	 d	eZG d
d deZdS )a0  Client annotated ACME challenges.

Please use names such as ``achall`` to distinguish from variables "of type"
:class:`acme.challenges.Challenge` (denoted by ``chall``)
and :class:`.ChallengeBody` (denoted by ``challb``)::

  from acme import challenges
  from acme import messages
  from certbot import achallenges

  chall = challenges.DNS(token='foo')
  challb = messages.ChallengeBody(chall=chall)
  achall = achallenges.DNS(chall=challb, domain='example.com')

Note, that all annotated challenges act as a proxy objects::

  achall.token == challb.token

    N)Type)
challenges)	Challengec                   @   s.   e Zd ZU dZdZeZee e	d< dd Z
dS )AnnotatedChallengezClient annotated challenge.

    Wraps around server provided challenge and annotates with data
    useful for the client.

    :ivar ~.challb: Wrapped `~.ChallengeBody`.

    )challb
_acme_typec                 C   s   t | j|S )N)getattrr   )selfname r   5/usr/lib/python3/dist-packages/certbot/achallenges.py__getattr__+   s   zAnnotatedChallenge.__getattr__N)__name__
__module____qualname____doc__	__slots__NotImplementedr   r   r   __annotations__r   r   r   r   r   r      s
   
 r   c                   @   s   e Zd ZdZdZdd ZdS )"KeyAuthorizationAnnotatedChallengez7Client annotated `KeyAuthorizationChallenge` challenge.)r   domainaccount_keyc                 O   s   | j jj| jg|R i |S )z!Generate response and validation.)r   challresponse_and_validationr   )r	   argskwargsr   r   r   r   3   s   z:KeyAuthorizationAnnotatedChallenge.response_and_validationN)r   r   r   r   r   r   r   r   r   r   r   /   s    r   c                   @   s   e Zd ZdZdZejZdS )DNSz&Client annotated "dns" ACME challenge.)r   r   N)r   r   r   r   r   r   r   	acme_typer   r   r   r   r   9   s    
r   )r   loggingtypingr   josepyjoseacmer   acme.challengesr   	getLoggerr   loggerImmutableMapr   r   r   r   r   r   r   <module>   s    

