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
//! AUTHZ-CRED-CORE-1 §"Required behavior" — the `CredentialMinter`'s
//! constructor is `pub(crate)`. Activation code receives a reference; no
//! external path produces one.

use plexus_auth_core::{CredentialIssuer, CredentialMinter, MethodPath, Origin};

fn main() {
    // The minter's constructor is crate-private; this fails to compile.
    let issuer = CredentialIssuer::new(
        Origin::new("ws://example"),
        MethodPath::try_new("auth.login").unwrap(),
    );
    let _ = CredentialMinter::new_sealed(issuer);
}