OpenAgentID documentation
Source referencesRust module referenceopenagent-oidc

openagent-oidc · error

Declared module signatures, types, configuration, and source documentation.

Source: openagent-sdk/bridges/oidc/rust/src/error.rs. SHA-256: 337e5071fb79b843df2ddf7f81ac0d51e6114063ef68b75b13d3dfb4609dee56.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

error::Result

Result alias for OIDC bridge operations.

pub type Result<T> = std::result::Result<T, OidcBridgeError>;

Source line: 8.

error::OidcBridgeError

Unified error type for OIDC bridge operations.

#[derive(Debug, Error)]
pub enum OidcBridgeError {
    /// OIDC discovery failed (network, parse, missing fields).
    #[error("oidc discovery error: {0}")]
    Discovery(String),

    /// JWKS fetch or parse error.
    #[error("jwks error: {0}")]
    Jwks(String),

    /// JWT validation failed (signature, claims, expiry).
    #[error("jwt validation error: {0}")]
    JwtValidation(String),

    /// No provider matched the JWT issuer claim.
    #[error("unknown issuer: {0}")]
    UnknownIssuer(String),

    /// DID mapping or derivation failed.
    #[error("identity mapping error: {0}")]
    Mapping(String),

    /// Token exchange error (RFC 8693).
    #[error("token exchange error: {0}")]
    Exchange(String),

    /// ACT-to-JWT signing error.
    #[error("signing error: {0}")]
    Signing(String),

    /// Configuration error (missing required fields, invalid values).
    #[error("configuration error: {0}")]
    Config(String),

    /// HTTP transport error.
    #[error("transport error: {0}")]
    Transport(String),

    /// Underlying OAS identity error.
    #[error("identity error: {0}")]
    Identity(String),

    /// JSON serialization/deserialization error.
    #[error("json error: {0}")]
    Json(#[from] serde_json::Error),
}

Source line: 12.

error::OidcBridgeError::config

Construct a configuration error.

pub fn config(msg: impl Into<String>) -> Self;

Source line: 60.

error::OidcBridgeError::discovery

Construct a discovery error.

pub fn discovery(msg: impl Into<String>) -> Self;

Source line: 65.

error::OidcBridgeError::jwks

Construct a JWKS error.

pub fn jwks(msg: impl Into<String>) -> Self;

Source line: 70.

error::OidcBridgeError::jwt_validation

Construct a JWT validation error.

pub fn jwt_validation(msg: impl Into<String>) -> Self;

Source line: 75.

error::OidcBridgeError::mapping

Construct a mapping error.

pub fn mapping(msg: impl Into<String>) -> Self;

Source line: 80.

error::OidcBridgeError::transport

Construct a transport error.

pub fn transport(msg: impl Into<String>) -> Self;

Source line: 85.

On this page