This section contains the generic implementation of RFC7517. Find how to use it in JWK Guide.
authlib.jose.
JsonWebKey
(algorithms)¶JWK_AVAILABLE_ALGORITHMS
= {'EC': <authlib.jose.rfc7518._backends._jwk_cryptography.ECAlgorithm object>, 'RSA': <authlib.jose.rfc7518._backends._jwk_cryptography.RSAAlgorithm object>, 'oct': <authlib.jose.rfc7518.jwk_algorithms.OCTAlgorithm object>}¶Defined available JWK algorithms
loads
(obj, kid=None)¶Loads JSON Web Key object into a public/private key.
Parameters: |
|
---|---|
Returns: | key |
dumps
(key, kty=None, **params)¶Generate JWK format for the given public/private key.
Parameters: |
|
---|---|
Returns: | JWK dict |
authlib.jose.
JWKAlgorithm
¶algorithm_location
= 'kty'¶Interface for JWK algorithm. JWA specification (RFC7518) SHOULD implement the algorithms for JWK with this base implementation.
prepare_key
(key)¶Prepare key before dumping it into JWK.
loads
(obj)¶Load JWK dict object into a public/private key.
dumps
(key)¶Dump a public/private key into JWK dict object.