https://t.me/RX1948
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/jwt/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/jwt/__pycache__/api_jwk.cpython-310.pyc
o

�E�`~�@sHddlZddlmZddlmZmZmZGdd�d�ZGdd�d�ZdS)	�N�)�get_default_algorithms)�InvalidKeyError�
PyJWKError�
PyJWKSetErrorc@sVeZdZddd�Zeddd��Zeddd��Zedd	��Zed
d��Z	edd
��Z
dS)�PyJWKNcCs@t�|_||_|j�dd�}|std|j��|s&t|jt�r&|j�dd�}|s�|j�dd�}|dkrW|dks9|s<d}nI|dkrCd	}nB|d
krJd}n;|dkrQd
}n4td|��|dkr^d}n'|dkred}n |dkr|srtd|j��|dkryd}ntd|��td|��|j�|�|_|js�td|j��|j�	|j�|_
dS)N�ktyzkty is not found: %s�alg�crv�ECzP-256�ES256zP-384�ES384zP-521�ES512�	secp256k1�ES256KzUnsupported crv: %s�RSA�RS256�oct�HS256�OKPzcrv is not found: %s�Ed25519�EdDSAzUnsupported kty: %sz&Unable to find a algorithm for key: %s)r�_algorithms�	_jwk_data�getr�
isinstance�dict�	Algorithmr�from_jwk�key)�self�jwk_data�	algorithmrr
�r#�-/usr/lib/python3/dist-packages/jwt/api_jwk.py�__init__sDzPyJWK.__init__cCs
t||�S�N)r)�objr"r#r#r$�	from_dict6s
zPyJWK.from_dictcCst�|�}t�||�Sr&)�json�loadsrr()�datar"r'r#r#r$�	from_json:s
zPyJWK.from_jsoncC�|j�dd�S)Nr�rr�r r#r#r$�key_type?�zPyJWK.key_typecCr-)N�kidr.r/r#r#r$�key_idCr1zPyJWK.key_idcCr-)N�user.r/r#r#r$�public_key_useGr1zPyJWK.public_key_user&)�__name__�
__module__�__qualname__r%�staticmethodr(r,�propertyr0r3r5r#r#r#r$rs
.

rc@s,eZdZdd�Zedd��Zedd��ZdS)�PyJWKSetcCsNg|_|r
t|t�std��t|�dkrtd��|D]
}|j�t|��qdS)NzInvalid JWK Set valuerz$The JWK Set did not contain any keys)�keysr�listr�len�appendr)r r<rr#r#r$r%Ms�zPyJWKSet.__init__cCs|�dg�}t|�S)Nr<)rr;)r'r<r#r#r$r(YszPyJWKSet.from_dictcCst�|�}t�|�Sr&)r)r*r;r()r+r'r#r#r$r,^s

zPyJWKSet.from_jsonN)r6r7r8r%r9r(r,r#r#r#r$r;Ls
r;)	r)�
algorithmsr�
exceptionsrrrrr;r#r#r#r$�<module>s
E

https://t.me/RX1948 - 2025