�
u��g�: � �` � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZddlm Z ej
e� � Zdd�Z
e
Zd� Z G d� de� � Z G d � d
e� � Z G d� de� � Z G d
� de� � Z G d� de� � Zdd�Zd� Z G d� de� � Z G d� de j � � ZdS )� N� )�oauth2�utf-8c � � | dt | � � dz z z
} t | � � } t j | � � }|r|� |� � }|S )a� Decode a part of the JWT.
JWT is encoded by padding-less base64url,
based on `JWS specs <https://tools.ietf.org/html/rfc7515#appendix-C>`_.
:param encoding:
If you are going to decode the first 2 parts of a JWT, i.e. the header
or the payload, the default value "utf-8" would work fine.
If you are going to decode the last part i.e. the signature part,
it is a binary string so you should use `None` as encoding here.
�=� )�len�str�base64�urlsafe_b64decode�decode)�raw�encoding�outputs �c/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/msal/oauth2cli/oidc.py�decode_partr sc � � �3�3�s�8�8�)�a�-� � �C�
� �
�
�C� �
%�c�
*�
*�F�� )����x�(�(���M� c �P � t j dt j | � � � � S )Nz%Y-%m-%d %H:%M:%S)�time�strftime� localtime)�epochs r �_epoch_to_localr '