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/serializers/__pycache__/ |
Upload File : |
o �%�YU � @ sP d dl Z d dlZd dlmZ G dd� de�Zdd� Zdd� Zd d � Zdd� Z dS ) � N)�utilsc @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dS )�JsonSerializerz8Serializer used to produce JSON macaroon format v1. c C s, ddl m} |j|jkr| �|�S | �|�S )z�Serialize the macaroon in JSON format indicated by the version field. @param macaroon the macaroon to serialize. @return JSON macaroon. r )�macaroon)�pymacaroonsr �version�MACAROON_V1� _serialize_v1� _serialize_v2)�self�mr � r �I/usr/lib/python3/dist-packages/pymacaroons/serializers/json_serializer.py� serialize s zJsonSerializer.serializec C sH t �|j�|jd�}|jr|j|d<