pub mod shared;
#[cfg(not(target_family = "wasm"))]
pub mod native;
#[cfg(feature = "server")]
pub mod server;
#[cfg(any(feature = "wasm-bindgen-oauth", feature = "wasm-bindgen-session"))]
pub mod wasm_bindgen;
pub use shared::types::{
AuthCredential, Authenticated, AuthenticationErrors, AuthenticationResult,
AuthenticationStates, ConfidentialText, JwtCredential, OnAuthData, OAuthCredential,
AuthProviderEndpoint, SessionCredential,
};
pub use shared::auth_manager::{AuthManager, AuthManagerConfig, AuthManagerError};
pub use shared::auth_state::{AuthEvent, AuthState, AuthStateError, AuthStateMachine, QueuedRequest};
pub use shared::auth_token::AuthToken;
pub use shared::credential_store::{
AsyncCredentialStore, CredentialStorage, CredentialStore, CredentialStoreError, OAuthState, OAuthTokenStore,
StoredCredential,
};
pub use shared::jwt::{
JwtAlgorithm, JwtError, JwtManager, JwtToken, JwtVerifier, JwtVerifierConfig, JwtSigningKey,
PublicKeySource, VerifiedClaims,
};
pub use shared::jwks::{Jwk, Jwks, JwksError, JwksManager};
pub use shared::discovery::{DiscoveryClient, DiscoveryError, OidcDiscovery};
pub use shared::upstream_client::{UpstreamClientError, UpstreamOidcClient, UpstreamProfile};
pub use shared::provider::{ProviderMapping, ProviderType, ProviderUpdate, UpstreamProvider};
pub use shared::userinfo::{UserInfo, UserInfoClient, UserInfoError};
pub use shared::introspection::{IntrospectionClient, IntrospectionError, IntrospectionResult};
pub use shared::middleware::{
extract_bearer_token, extract_session_token, has_scope, optional_auth, require_auth,
AuthContext, GuardResult,
};
pub use shared::auth_session::{
AuthSessionError, UpstreamAuthSession, UpstreamAuthSessionStore, DEFAULT_AUTH_SESSION_TTL_SECS,
};
pub use shared::oauth::{OAuthConfig, OAuthConfigBuilder, OAuthError, OAuthManager, PkceChallenge};
pub use shared::oauth::TokenResponse;
pub use shared::oauth_token::OAuthToken;
pub use shared::session::{Session, SessionConfig, SessionError, SessionManager};
pub use shared::two_factor::{BackupCodeSet, TOTPSecret, TwoFactorChallenge, TwoFactorError};
#[cfg(not(target_family = "wasm"))]
pub use native::oauth::NativeOAuth;
#[cfg(not(target_family = "wasm"))]
pub use native::password_auth::{
LoginResult, LoginRequest, MfaType, PasswordAuthClient, PasswordAuthError,
};
#[cfg(all(target_family = "wasm", feature = "wasm-bindgen-oauth"))]
pub use wasm_bindgen::oauth::WasmOAuth;
#[cfg(target_family = "wasm")]
#[cfg(feature = "wasm-bindgen-session")]
pub use wasm_bindgen::d1_credential_store::D1CredentialStore;
#[cfg(target_family = "wasm")]
#[cfg(feature = "wasm-bindgen-session")]
pub use wasm_bindgen::session::{SessionPayload, WasmSessionManager};