ó
Á£ô_c           @   s†   d  Z  d d l Z d d l Z d d l m Z e j e ƒ Z d e j	 f d „  ƒ  YZ
 d e
 f d „  ƒ  YZ d e
 f d	 „  ƒ  YZ d S(
   s0  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

iÿÿÿÿN(   t
   challengest   AnnotatedChallengec           B   s#   e  Z d  Z d Z e Z d „  Z RS(   s®   Client annotated challenge.

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

    :ivar challb: Wrapped `~.ChallengeBody`.

    t   challbc         C   s   t  |  j | ƒ S(   N(   t   getattrR   (   t   selft   name(    (    s7   /usr/lib/python2.7/site-packages/certbot/achallenges.pyt   __getattr__*   s    (   s   challb(   t   __name__t
   __module__t   __doc__t	   __slots__t   NotImplementedt	   acme_typeR   (    (    (    s7   /usr/lib/python2.7/site-packages/certbot/achallenges.pyR      s   t"   KeyAuthorizationAnnotatedChallengec           B   s   e  Z d  Z d Z d „  Z RS(   s7   Client annotated `KeyAuthorizationChallenge` challenge.R   t   domaint   account_keyc         O   s   |  j  j j |  j | | Ž S(   s!   Generate response and validation.(   R   t   challt   response_and_validationR   (   R   t   argst   kwargs(    (    s7   /usr/lib/python2.7/site-packages/certbot/achallenges.pyR   2   s    (   s   challbR   s   account_key(   R   R   R	   R
   R   (    (    (    s7   /usr/lib/python2.7/site-packages/certbot/achallenges.pyR   .   s   t   DNSc           B   s   e  Z d  Z d Z e j Z RS(   s&   Client annotated "dns" ACME challenge.R   R   (   s   challbs   domain(   R   R   R	   R
   R    R   R   (    (    (    s7   /usr/lib/python2.7/site-packages/certbot/achallenges.pyR   8   s   (   R	   t   loggingt   josepyt   joset   acmeR    t	   getLoggerR   t   loggert   ImmutableMapR   R   R   (    (    (    s7   /usr/lib/python2.7/site-packages/certbot/achallenges.pyt   <module>   s   
