rs-identity-model 0.5.0

Production-grade, RFC-compliant OIDC/OAuth2 client library for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Minimal example: imports the crate and exercises the public error type.
//! Run with: `cargo run --example basic_setup`

use rs_identity_model::IdentityError;

fn main() {
    let modules = ["discovery", "jwks", "jwt", "token", "userinfo"];
    println!("identity-model (Rust) — scaffolded.");
    println!("Modules: {}", modules.join(", "));

    // Demonstrate the unified error type that every capability returns.
    let example: Result<(), IdentityError> =
        Err(IdentityError::Validation("example: token expired".into()));
    if let Err(e) = example {
        println!("Example error surface: {e}");
    }
}