관리-도구
편집 파일: api_jwk.cpython-311.pyc
� �܋fd � � � 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 � � ZdS )� )�annotationsN)�Any� )�get_default_algorithms� has_crypto�requires_cryptography)�InvalidKeyError� PyJWKError� PyJWKSetError� PyJWTError)�JWKDictc � � e Zd Zddd�Zeddd�� � Zeddd�� � Zedd�� � Zedd�� � Z edd�� � Z dS )�PyJWKN�jwk_datar � algorithm� str | None�return�Nonec � � t � � | _ || _ | j � dd � � }|st d| j � �� � �|s5t | j t � � r| j � dd � � }|s�| j � dd � � }|dk r8|dk s|sd}n�|dk rd }n�|d k rd}ny|dk rd }npt d|� �� � �|dk rd}nU|dk rd}nL|dk r4|st d| j � �� � �|dk rd}n$t d|� �� � �t d|� �� � �t s|t v rt |� d�� � �| j � |� � | _ | j st d| j � �� � �| j � | j � � | _ d S )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)�selfr r r r s �B/opt/cloudlinux/venv/lib64/python3.11/site-packages/jwt/api_jwk.py�__init__zPyJWK.__init__ s � �1�3�3���!����n� � ���-�-��� I�!�"G�t�~�"G�"G�H�H�H�� 8�Z����=�=� 8���*�*�5�$�7�7�I�� A��.�$�$�U�D�1�1�C��d�{�{��'�>�>��>� '�I�I��G�^�^� '�I�I��G�^�^� '�I�I��K�'�'� (�I�I�)�*C�c�*C�*C�D�D�D�����#� � �����#� � ������ Q�)�*O�t�~�*O�*O�P�P�P��)�#�#� '�I�I�)�*C�c�*C�*C�D�D�D�%�&?�#�&?�&?�@�@�@�� V�i�+@�@�@�� �T�T�T�U�U�U��)�-�-�i�8�8����~� W��U�T�^�U�U�V�V�V��>�*�*�4�>�:�:����� �obj�'PyJWK'c �"