%PDF- %PDF-
Direktori : /lib/python3/dist-packages/jwt/__pycache__/ |
Current File : //lib/python3/dist-packages/jwt/__pycache__/api_jwk.cpython-312.pyc |
� d��dd � � � d dl mZ d dlZd dlZd dlmZ ddlmZmZm Z ddl mZmZm Z mZ ddlmZ G d� d � Z G d � d� Z G d� d � Zy)� )�annotationsN)�Any� )�get_default_algorithms� has_crypto�requires_cryptography)�InvalidKeyError� PyJWKError� PyJWKSetError� PyJWTError)�JWKDictc �t � e Zd Zdd d�Zedd d�� Zeddd�� Zedd�� Zedd�� Z edd�� Z y) �PyJWKNc �l � t � | _ || _ | j j dd � }|st d| j � �� �|s6t | j t � r| j j dd � }|s�| j j dd � }|dk( r0|dk( s|sd}ny|dk( rd }nq|d k( rd}ni|dk( rd }nat d|� �� �|dk( rd}nK|dk( rd}nC|dk( r0|st d| j � �� �|dk( rd}nt d|� �� �t d|� �� �t s|t v rt |� d�� �| j j |� | _ | j st d| j � �� �| j j | j � | _ y )N�ktyzkty is not found: �alg�crv�ECzP-256�ES256zP-384�ES384zP-521�ES512� secp256k1�ES256KzUnsupported crv: �RSA�RS256�oct�HS256�OKPzcrv is not found: �Ed25519�EdDSAzUnsupported kty: z) requires 'cryptography' to be installed.z%Unable to find an algorithm for key: ) r �_algorithms� _jwk_data�getr � isinstance�dictr r r � Algorithm�from_jwk�key)�self�jwk_data� algorithmr r s �-/usr/lib/python3/dist-packages/jwt/api_jwk.py�__init__zPyJWK.__init__ s� � �1�3���!����n�n� � ���-���!�$6�t�~�~�6F�"G�H�H��Z�����=����*�*�5�$�7�I���.�.�$�$�U�D�1�C��d�{��'�>�� '�I��G�^� '�I��G�^� '�I��K�'� (�I�)�,=�c�U�*C�D�D����#� ����#� �����)�,>�t�~�~�>N�*O�P�P��)�#� '�I�)�,=�c�U�*C�D�D�%�(9�#��&?�@�@��i�+@�@�� �{�*S�T�U�U��)�)�-�-�i�8����~�~��D�T�^�^�DT�U�V�V��>�>�*�*�4�>�>�:��� c � � t | |� S �N)r )�objr+ s r, � from_dictzPyJWK.from_dict>