#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(missing_docs)]
pub mod errors;
pub mod types;
mod auth_url;
pub mod cache;
mod client;
mod dcr;
mod discovery;
mod exchange;
pub mod http;
mod id_token;
mod introspect;
mod jwks;
mod pkce;
mod userinfo;
pub mod tenant;
pub mod discovery_tenant;
pub mod http_tenant;
#[cfg(feature = "verifier")]
mod verify;
#[cfg(not(target_arch = "wasm32"))]
pub mod sse;
pub use auth_url::{
build_auth_url, build_auth_url_with_metadata, build_end_session_url,
build_end_session_url_with_discovery, parse_callback_params,
};
pub use cache::{Cache, NoOpCache, MemoryCache};
#[cfg(feature = "lru")]
pub use cache::LruCacheImpl;
#[cfg(all(not(target_arch = "wasm32"), feature = "moka"))]
pub use cache::MokaCacheImpl;
#[cfg(all(not(target_arch = "wasm32"), feature = "http-reqwest", feature = "moka"))]
pub use client::OidcClient;
#[cfg(not(target_arch = "wasm32"))]
pub use dcr::{register_client, get_client_config};
pub use discovery::discover;
pub use errors::Error;
#[cfg(not(target_arch = "wasm32"))]
pub use exchange::{exchange_code, refresh_token};
pub use http::{HttpClient, HttpClientError};
pub use id_token::fetch_jwks;
#[cfg(all(not(target_arch = "wasm32"), feature = "http-reqwest"))]
pub use http::ReqwestHttpClient;
#[cfg(all(target_arch = "wasm32", feature = "http-wasm"))]
pub use http::WasmHttpClient;
pub use id_token::verify_id_token;
#[cfg(not(target_arch = "wasm32"))]
pub use introspect::{introspect_token, revoke_token};
pub use jwks::{Jwk, Jwks};
pub use pkce::create_pkce;
pub use types::*;
pub use userinfo::get_userinfo;
#[cfg(feature = "verifier")]
pub use verify::JwtVerifier;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub mod prelude {
pub use crate::{
build_auth_url, build_end_session_url, build_end_session_url_with_discovery,
create_pkce, discover, parse_callback_params, verify_id_token, AuthUrlResult, BuildAuthUrl,
CallbackParams, EndSession, Error, OidcProviderMetadata, TokenResponse,
VerifiedIdToken, VerifyOptions,
};
pub use crate::{
tenant::{TenantConfig, TenantMode, TenantResolution},
discovery_tenant::{discover_with_tenant, discover_with_tenant_simple, discover_with_tenant_resolution},
http_tenant::{HttpClientWithAdminSupport, HttpClientAdapter},
};
#[cfg(all(not(target_arch = "wasm32"), feature = "http-reqwest"))]
pub use crate::http_tenant::reqwest_tenant::ReqwestHttpClientWithAdminSupport;
#[cfg(not(target_arch = "wasm32"))]
pub use crate::{
exchange_code, refresh_token, register_client, get_client_config,
introspect_token, revoke_token,
ExchangeCode, RefreshTokenRequest, RegisterRequest,
IntrospectRequest, IntrospectResponse, ClientConfig,
};
pub use crate::{get_userinfo, UserInfo};
#[cfg(feature = "verifier")]
pub use crate::{JwtVerifier, VerifiedClaims};
#[cfg(all(not(target_arch = "wasm32"), feature = "sse"))]
pub use crate::sse::{
start_login_session, check_login_status, subscribe_login_events,
LoginStatus, LoginState, LoginEvent, LoginMonitorConfig,
};
}