3 Ú¯a³ã@s„dZddlZddlmZddlmZddlZddlmZddl m Z ej e ƒZ Gdd„dejƒZGd d „d eƒZGd d „d eƒZdS) a0Client 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)ÚAny)ÚType)Ú challenges)Ú Challengec@s2eZdZUdZdZeZeee e dœdd„Z dS)ÚAnnotatedChallengez°Client annotated challenge. Wraps around server provided challenge and annotates with data useful for the client. :ivar ~.challb: Wrapped `~.ChallengeBody`. Úchallb)ÚnameÚreturncCs t|j|ƒS)N)Úgetattrr)Úselfr©r ú!/usr/lib/python3.6/achallenges.pyÚ __getattr__,szAnnotatedChallenge.__getattr__N)r) Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __slots__ÚNotImplementedZ _acme_typerrÚstrrrr r r r r s  rc@s&eZdZdZd Zeeedœdd„ZdS) Ú"KeyAuthorizationAnnotatedChallengez7Client annotated `KeyAuthorizationChallenge` challenge.rÚdomainÚ account_key)ÚargsÚkwargsr cOs|jjj|jf|ž|ŽS)z!Generate response and validation.)rZchallÚresponse_and_validationr)r rrr r r r4sz:KeyAuthorizationAnnotatedChallenge.response_and_validationN)rrr)rrrrrrrr r r r r0src@seZdZdZdZejZdS)ÚDNSz&Client annotated "dns" ACME challenge.rrN)rr)rrrrrrrZ acme_typer r r r r:sr)rZloggingZtypingrrZjosepyZjoseZacmerZacme.challengesrZ getLoggerrZloggerZ ImmutableMaprrrr r r r Ús