Skip to main content

Module error

Module error 

Source
Expand description

Error types for JWK/JWKS operations.

This module provides the crate’s core error taxonomy.

Most fallible operations return Result<T, Error>. Feature-gated integration adapters may expose dedicated conversion error types when that yields clearer API boundaries.

Key validation errors are split into two categories:

  • InvalidKeyError - the JWK is malformed (invalid encoding, missing parameters, inconsistent fields). These mean “reject this key entirely.”

  • IncompatibleKeyError - the JWK is well-formed but incompatible with the requested use (wrong key type for algorithm, insufficient strength, operation not permitted by metadata). These mean “valid key, wrong context.”

Enums§

Error
The main error type for core JWK/JWKS operations.
IncompatibleKeyError
The JWK is well-formed but incompatible with the requested use.
InvalidKeyError
The JWK is malformed.
JwtSimpleKeyConversionErrorjwt-simple
Errors that occur when converting a JWK into a jwt-simple key type.
ParseError
Errors that occur during JSON parsing.

Type Aliases§

Result
A type alias for Result<T, Error>.