JsonWebKey Class

Inheritance
JsonWebKey

Constructor

JsonWebKey(*, kid: str = None, kty=None, key_ops=None, n: bytes = None, e: bytes = None, d: bytes = None, dp: bytes = None, dq: bytes = None, qi: bytes = None, p: bytes = None, q: bytes = None, k: bytes = None, t: bytes = None, crv=None, x: bytes = None, y: bytes = None, **kwargs) -> None

Parameters

kid
str
Required

Key identifier.

kty
str or JsonWebKeyType
Required

JsonWebKey key type (kty). Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'

key_ops
list[str]
Required
n
bytes
Required

RSA modulus.

e
bytes
Required

RSA public exponent.

d
bytes
Required

RSA private exponent, or the D component of an EC private key.

dp
bytes
Required

RSA private key parameter.

dq
bytes
Required

RSA private key parameter.

qi
bytes
Required

RSA private key parameter.

p
bytes
Required

RSA secret prime.

q
bytes
Required

RSA secret prime, with p < q.

k
bytes
Required

Symmetric key.

t
bytes
Required

HSM Token, used with 'Bring Your Own Key'.

crv
str or JsonWebKeyCurveName
Required

Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521', 'SECP256K1'

x
bytes
Required

X component of an EC public key.

y
bytes
Required

Y component of an EC public key.