Skip to main content

affinidi_openid4vci/
lib.rs

1/*!
2 * OpenID for Verifiable Credential Issuance (OpenID4VCI).
3 *
4 * Implements the [OpenID4VCI 1.0](https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html)
5 * specification for issuing verifiable credentials to wallet instances.
6 *
7 * # Flows
8 *
9 * ## Authorization Code Flow
10 * 1. Issuer creates credential offer (QR code / deep link)
11 * 2. Wallet discovers issuer metadata
12 * 3. Wallet initiates OAuth 2.0 authorization
13 * 4. User authenticates at issuer
14 * 5. Wallet receives authorization code
15 * 6. Wallet exchanges code for access token
16 * 7. Wallet requests credential with proof of possession
17 * 8. Issuer returns signed credential
18 *
19 * ## Pre-Authorized Code Flow
20 * 1. Issuer creates credential offer with pre-authorized code
21 * 2. Wallet discovers issuer metadata
22 * 3. Wallet exchanges pre-authorized code (+ optional PIN) for access token
23 * 4. Wallet requests credential with proof of possession
24 * 5. Issuer returns signed credential
25 *
26 * # Supported Credential Formats
27 *
28 * - `vc+sd-jwt` — SD-JWT VC (mandatory for eIDAS)
29 * - `mso_mdoc` — ISO mdoc (mandatory for eIDAS)
30 * - `jwt_vc_json` — JWT-secured VC
31 * - `ldp_vc` — Linked Data Proof VC
32 */
33
34pub mod error;
35pub mod issuer;
36pub mod proof;
37pub mod types;
38pub mod wallet;
39
40pub use error::Oid4vciError;
41pub use proof::{KeyProof, KeyProofClaims, ProofPolicy, build_key_proof_jwt};
42pub use types::*;