Skip to main content

pas_external/
lib.rs

1#![doc = include_str!("../README.md")]
2
3pub mod error;
4#[cfg(feature = "oauth")]
5pub mod oauth;
6#[cfg(feature = "oauth")]
7pub mod pas_port;
8#[cfg(feature = "oauth")]
9pub mod pkce;
10#[cfg(feature = "session-liveness")]
11pub mod session_liveness;
12#[cfg(feature = "token")]
13pub mod token;
14pub mod types;
15
16#[cfg(feature = "axum")]
17pub mod middleware;
18
19// Re-exports for convenient access
20pub use error::{Error, TokenError};
21#[cfg(feature = "oauth")]
22pub use oauth::{AuthClient, AuthorizationRequest, OAuthConfig, TokenResponse, UserInfo};
23#[cfg(feature = "oauth")]
24pub use pkce::{generate_code_challenge, generate_code_verifier, generate_state};
25#[cfg(feature = "session-liveness")]
26pub use session_liveness::{
27    CipherError, EncryptedRefreshToken, LivenessFailure, LivenessOutcome, RevokeCause,
28    TokenCipher, TransientCause, attempt_liveness_refresh,
29};
30// γ port-and-adapter — Phase 6.1 (D-04 = γ, locked 2026-05-05).
31// `KeySet`, `PublicKey`, `VerifiedClaims`, `verify_v4_*`,
32// `parse_public_key_hex`, `extract_unverified_kid`, and the
33// `WellKnownPaseto*` types from 0.5 are removed — see CHANGELOG 0.6.0.
34#[cfg(feature = "token")]
35pub use token::{AuthSession, BearerVerifier, Expectations, VerifyError};
36#[cfg(feature = "well-known-fetch")]
37pub use token::PasJwtVerifier;
38#[cfg(any(test, feature = "test-support"))]
39pub use token::MemoryBearerVerifier;
40pub use types::{KeyId, Ppnum, PpnumId, SessionId, UserId};
41#[cfg(feature = "oauth")]
42pub use url::Url;