ProPeler
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
lib
/
python3
/
dist-packages
/
pymacaroons
/
__pycache__
/
Filename :
macaroon.cpython-38.pyc
back
Copy
U �%�Ya � @ s� d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl m Z d dlmZm Z mZ d dlmZmZ d Zd ZG dd� de�ZdS ) � )�unicode_literalsN)�standard_b64encode)�HashSignaturesBinder)�BinarySerializer)�MacaroonInitException)�convert_to_bytes�convert_to_string�create_initial_signature)�FirstPartyCaveatDelegate�ThirdPartyCaveatDelegate� � c @ s� e Zd Zdddddefdd�Zed%dd��Zedd� �Zej dd� �Zed d � �Z edd� �Zed d� �Zej dd� �Zedd� �Z e j dd� �Z edd� �Zdd� Zd&dd�Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� ZdS )'�MacaroonNc C sd |t krt }|| _|pg | _|p"d| _|p,d| _|p6d| _t� | _t� | _ |r`t t|�| j�| _d S )N� ) �MACAROON_V2�_version�caveats�location� identifier� signaturer �first_party_caveat_delegater �third_party_caveat_delegater r �identifier_bytes)�selfr r �keyr r �version� r �6/usr/lib/python3/dist-packages/pymacaroons/macaroon.py�__init__ s �zMacaroon.__init__c C s$ |pt � }|r|�|�S td��d S )Nz Must supply serialized macaroon.)r �deserializer )�clsZ serialized� serializerr r r r + s �zMacaroon.deserializec C s t | j�S �N)r � _location�r r r r r 5 s zMacaroon.locationc C s t |�| _d S r"