Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/pymacaroons/__pycache__/ |
Upload File : |
o �%�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 sh |t krt }|| _|pg | _|pd| _|pd| _|pd| _t� | _t� | _ |r2t t|�| j�| _d S 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��)Nz Must supply serialized macaroon.)r �deserializer )�cls� serialized� serializerr r r r + s �zMacaroon.deserializec C � t | j�S �N)r � _location�r r r r r 5 � zMacaroon.locationc C � t |�| _d S r$ )r r% �r �string_or_bytesr r r r 9 � c C � | j S r$ )r r&