sdkagent

joserfc API reference

61 public APIs from joserfc (authlib/joserfc) — 36 classes, 5 functions, 20 methods. Signatures extracted by static analysis of the actual source.

Repository: authlib/joserfc

KindCount
Classes36
Functions5
Methods20

API list

classsrc.joserfc._keys.JWKRegistry
A registry for JWK to record ``joserfc`` supported key types.
classsrc.joserfc._rfc7515.model.CompactSignature
JSON Web Signature object for compact mode.
methodsrc.joserfc._rfc7515.model.CompactSignature.headers() -> Header
Returns protected header values in dict.
classsrc.joserfc._rfc7515.model.HeaderMember
A header member of the JSON signature.
classsrc.joserfc._rfc7515.model.JWSAlgModel
Interface for JWS algorithm.
methodsrc.joserfc._rfc7515.model.JWSAlgModel.sign(msg:bytes, key:Any) -> bytes
Sign the text msg with a private/sign key.
methodsrc.joserfc._rfc7515.model.JWSAlgModel.verify(msg:bytes, sig:bytes, key:Any) -> bool
Verify the signature of text msg with a public/verify key.
classsrc.joserfc._rfc7516.models.CompactEncryption
An object to represent the JWE Compact Serialization.
methodsrc.joserfc._rfc7516.models.CompactEncryption.attach_recipient(key:Key, header:Header | None=None) -> None
Add a recipient to the JWE Compact Serialization.
methodsrc.joserfc._rfc7516.models.CompactEncryption.headers() -> Header
Returns the protected header values in dict.
methodsrc.joserfc._rfc7517.models.BaseKey.alg() -> str | None
The "alg" value of the JSON Web Key.
methodsrc.joserfc._rfc7517.models.BaseKey.as_dict(private:bool=False, **params:t.Any) -> DictKey
Output this key to a JWK format (in dict).
methodsrc.joserfc._rfc7517.models.BaseKey.check_alg(alg:str) -> None
Check if this key supports the given "alg".
methodsrc.joserfc._rfc7517.models.BaseKey.check_key_op(operation:str) -> None
Check if the given key_op is supported by this key.
methodsrc.joserfc._rfc7517.models.BaseKey.check_use(use:str) -> None
Check if this key supports the given "use".
methodsrc.joserfc._rfc7517.models.BaseKey.dict_value() -> DictKey
Property of the Key in Dict (JSON).
methodsrc.joserfc._rfc7517.models.BaseKey.ensure_kid() -> None
Ensure this key has a ``kid``.
methodsrc.joserfc._rfc7517.models.BaseKey.kid() -> str | None
The "kid" value of the JSON Web Key.
methodsrc.joserfc._rfc7517.models.SymmetricKey.is_private() -> bool
A symmetric key will always be private.
methodsrc.joserfc._rfc7517.models.SymmetricKey.private_key() -> bytes
Returns the ``raw_value`` as the private key.
methodsrc.joserfc._rfc7517.models.SymmetricKey.public_key() -> bytes
Returns the ``raw_value`` as the public key.
methodsrc.joserfc._rfc7517.models.SymmetricKey.raw_value() -> bytes
The raw key in bytes.
funcsrc.joserfc._rfc7517.pem.dump_pem_key(key:Any, encoding:Literal['PEM', 'DER'] | None=None, private:bool | None=False, password:Any | None=None) -> bytes
Export key into PEM/DER format bytes.
classsrc.joserfc._rfc7518.jws_algs.ESAlgorithm
ECDSA using SHA algorithms for JWS.
classsrc.joserfc._rfc7518.jws_algs.HMACAlgorithm
HMAC using SHA algorithms for JWS.
classsrc.joserfc._rfc7518.jws_algs.RSAAlgorithm
RSA using SHA algorithms for JWS.
classsrc.joserfc._rfc7518.jws_algs.RSAPSSAlgorithm
RSASSA-PSS using SHA algorithms for JWS.
classsrc.joserfc._rfc7518.oct_key.OctKey
OctKey is a symmetric key, defined by RFC7518 Section 6.4.
classsrc.joserfc._rfc7519.claims.BaseClaimsRegistry
Requesting "claims" for JWT with the given conditions.
methodsrc.joserfc._rfc7519.claims.BaseClaimsRegistry.check_value(claim_name:str, value:Any) -> None
Validates a given claim value based on predefined options.
methodsrc.joserfc._rfc7519.claims.BaseClaimsRegistry.essential_keys() -> set[str]
Returns the essential claim names.
classsrc.joserfc._rfc7519.claims.JWTClaimsRegistry
A claims registry for validating JWT claims.
methodsrc.joserfc._rfc7519.claims.JWTClaimsRegistry.now() -> int
Returns the current timestamp.
funcsrc.joserfc._rfc7519.claims.convert_claims(claims:Claims, encoder_cls:type[JSONEncoder] | None=None) -> bytes
Turn claims into bytes payload.
classsrc.joserfc._rfc8037.okp_key.OKPKey
Key class of the ``OKP`` key type.
funcsrc.joserfc._rfc9278.calculate_thumbprint_uri(value:dict[str, t.Any], digest_method:t.Literal['sha256', 'sha384', 'sha512']='sha256') -> str
Calculate JWK thumbprint URI, defined by RFC9278.
classsrc.joserfc.errors.BadSignatureError
This error is designed for JWS.
classsrc.joserfc.errors.ClaimError
This a base error for JWT claims validation.
classsrc.joserfc.errors.DecodeError
This error is designed for both JWS and JWE.
classsrc.joserfc.errors.ExpiredTokenError
This error is designed for JWT.
classsrc.joserfc.errors.InsecureClaimError
This error is designed for JWT.
classsrc.joserfc.errors.InvalidClaimError
This error is designed for JWT.
classsrc.joserfc.errors.InvalidEncryptionAlgorithmError
This error is designed for JWE.
classsrc.joserfc.errors.InvalidExchangeKeyError
This error is designed for EC and OKP keys.
classsrc.joserfc.errors.InvalidHeaderValueError
Raised when the given header's value is invalid.
classsrc.joserfc.errors.InvalidKeyCurveError
This error is designed for JWS.
classsrc.joserfc.errors.InvalidKeyIdError
This error is designed for Key Set.
classsrc.joserfc.errors.InvalidKeyLengthError
This error is designed for JWE.
classsrc.joserfc.errors.InvalidPayloadError
This error is designed for JWT.
classsrc.joserfc.errors.JoseError
Base Exception for all errors in joserfc.
classsrc.joserfc.errors.MissingAlgorithmError
Raised when an algorithm ("alg") is missing.
classsrc.joserfc.errors.MissingClaimError
This error is designed for JWT.
classsrc.joserfc.errors.MissingEncryptionError
This error is designed for JWE.
classsrc.joserfc.errors.MissingHeaderError
This error happens when the required header does not exist.
classsrc.joserfc.errors.SecurityWarning
Base class for warnings of security issues.
classsrc.joserfc.errors.UnsupportedAlgorithmError
This error is designed for both JWS and JWE.
classsrc.joserfc.errors.UnsupportedHeaderError
Raised when an unsupported header is encountered.
funcsrc.joserfc.jwk.guess_key(key:KeyFlexible, obj:GuestProtocol, random:bool=False, use:Literal['sig', 'enc'] | None=None) -> Key
Guess key from a various sources.
funcsrc.joserfc.jws.serialize_compact(protected:Header, payload:bytes | str, private_key:KeyFlexible | None, algorithms:Collection[str] | None=None, registry:JWSRegistry | None=None) -> str
Generate a JWS Compact Serialization.
classsrc.joserfc.registry.HeaderParameter
Define the header parameter for JWS and JWE.
classsrc.joserfc.registry.KeyParameter
Define the key parameter for JWK.

About this data

These signatures were extracted from the public source of authlib/joserfc using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries