1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Plug-and-play PAS authentication middleware for Axum.
//!
//! This module eliminates OAuth2 boilerplate for Axum applications
//! integrating with [PAS](https://accounts.ppoppo.com) (Ppoppo Accounts System).
//!
//! # Quick Start
//!
//! ```rust,ignore
//! use ppoppo_sdk::middleware::{PasAuthConfig, auth_routes, resolve_session};
//!
//! // 1. Implement AccountResolver and SessionStore traits for your app
//! // 2. Configure from environment
//! let config = PasAuthConfig::from_env()?;
//!
//! // 3. Mount auth routes
//! let app = axum::Router::new()
//! .merge(auth_routes(config, account_resolver, session_store));
//!
//! // 4. Use resolve_session() in your middleware
//! let auth = resolve_session(&session_store, &jar, "cookie_name").await?;
//! ```
pub use PasAuthConfig;
pub use AuthError;
pub use ;
pub use auth_routes;
pub use ;
pub use NewSession;
/// Re-export cookie key type for builder API.
pub use Key as CookieKey;