plexus-auth-core 0.1.0

Sealed-type primitives for the Plexus auth framework: AuthContext, VerifiedUser, Principal.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! AUTHZ-CORE-CRATE-1 §"Required behavior" — VerifiedUser cannot be
//! constructed by any external crate. The `pub(crate)` constructor and
//! private fields together make this fail to compile.

use plexus_auth_core::VerifiedUser;

fn main() {
    // Attempt 1: call the (sealed) constructor.
    let _ = VerifiedUser::new_sealed(
        "alice".to_string(),
        "https://idp.example.com".to_string(),
        0,
        0,
    );
}