ok

Mini Shell

Direktori : /lib/python3.6/site-packages/acme/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/acme/__pycache__/mixins.cpython-36.pyc

3

گa�@sjdZddlmZddlmZGdd�d�ZGdd�de�ZGdd	�d	e�Zeeeeeefd
�dd�Zd
S)z0Useful mixins for Challenge and Resource objects�)�Any)�DictcsReZdZdZeed�dd��Zejedd�dd��Zee	dd��fd	d
�Z
�ZS)�VersionedLEACMEMixinzEThis mixin stores the version of Let's Encrypt's endpoint being used.)�returncCst|dd�S)z*Define the version of ACME protocol to use�_le_acme_version�)�getattr)�self�r
�/usr/lib/python3.6/mixins.py�le_acme_versionsz$VersionedLEACMEMixin.le_acme_versionN)�versionrcCstj|d|�dS)Nr)�object�__setattr__)r	r
r
r
rr
s)�key�valuercs*|dkrtj|||�nt�j||�dS)Nr)rr�super)r	rr)�	__class__r
rrsz VersionedLEACMEMixin.__setattr__)�__name__�
__module__�__qualname__�__doc__�property�intr�setter�strrr�
__classcell__r
r
)rrrsrcsHeZdZdZeeefd��fdd�Zeeefd��fdd�Z�Z	S)�
ResourceMixinz�
    This mixin generates a RFC8555 compliant JWS payload
    by removing the `resource` field if needed (eg. ACME v2 protocol).
    )rcstt�dd�S)z/See josepy.JSONDeserializable.to_partial_json()�to_partial_json�resource)�_safe_jobj_compliancer)r	)rr
rr!szResourceMixin.to_partial_jsoncstt�dd�S)z8See josepy.JSONObjectWithFields.fields_to_partial_json()�fields_to_partial_jsonr)r r)r	)rr
rr!&sz$ResourceMixin.fields_to_partial_json)
rrrrrrrrr!rr
r
)rrrsrcsHeZdZdZeeefd��fdd�Zeeefd��fdd�Z�Z	S)�	TypeMixinz�
    This mixin allows generation of a RFC8555 compliant JWS payload
    by removing the `type` field if needed (eg. ACME v2 protocol).
    )rcstt�dd�S)z/See josepy.JSONDeserializable.to_partial_json()r�type)r r)r	)rr
rr1szTypeMixin.to_partial_jsoncstt�dd�S)z8See josepy.JSONObjectWithFields.fields_to_partial_json()r!r#)r r)r	)rr
rr!6sz TypeMixin.fields_to_partial_json)
rrrrrrrrr!rr
r
)rrr",sr")�instance�jobj_method�uncompliant_fieldrcCsBt||�r0t||��}|jdkr,|j|d�|Stdj|���dS)N�z Method {0}() is not implemented.)�hasattrrr�pop�AttributeError�format)r$r%r&Zjobjr
r
rr <s

r N)	rZtypingrrrrr"rr r
r
r
r�<module>s

Zerion Mini Shell 1.0