baseid_oid4vci/
lib.rs

1//! # baseid-oid4vci
2//!
3//! OpenID for Verifiable Credential Issuance (OID4VCI).
4//!
5//! Supports:
6//! - Authorization code flow
7//! - Pre-authorized code flow
8//! - Credential offer
9//! - Batch issuance
10//!
11//! Reference: <https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html>
12
13pub mod client;
14pub mod credential;
15pub mod credential_offer;
16pub mod error;
17pub mod metadata;
18pub mod proof;
19pub mod token;
20pub mod wallet;
21
22use serde::{Deserialize, Serialize};
23
24/// Credential issuer metadata as defined in OID4VCI 1.0.
25#[derive(Debug, Clone, Serialize, Deserialize)]
26pub struct IssuerMetadata {
27    /// The credential issuer identifier.
28    pub credential_issuer: String,
29    /// Authorization server URL.
30    #[serde(skip_serializing_if = "Option::is_none")]
31    pub authorization_server: Option<String>,
32    /// Credential endpoint URL.
33    pub credential_endpoint: String,
34    /// Token endpoint URL (if different from authorization server).
35    #[serde(skip_serializing_if = "Option::is_none")]
36    pub token_endpoint: Option<String>,
37    /// Nonce endpoint URL for obtaining challenge nonces (OID4VCI 1.0).
38    #[serde(skip_serializing_if = "Option::is_none")]
39    pub nonce_endpoint: Option<String>,
40    /// Deferred credential endpoint URL.
41    #[serde(skip_serializing_if = "Option::is_none")]
42    pub deferred_credential_endpoint: Option<String>,
43    /// Notification endpoint URL.
44    #[serde(skip_serializing_if = "Option::is_none")]
45    pub notification_endpoint: Option<String>,
46    /// Supported credential configurations.
47    pub credential_configurations_supported: std::collections::BTreeMap<String, serde_json::Value>,
48}