Skip to main content

allowthem_server/
server.rs

1// allowthem-server: HTTP routes, middleware, and extractors
2
3pub mod all_routes;
4#[cfg(test)]
5mod all_server_templates_guard_tests;
6#[cfg(test)]
7mod auth_template_guard_tests;
8pub mod authorize_routes;
9pub mod bearer;
10pub mod branding;
11pub mod browser_error;
12pub mod browser_templates;
13pub mod consent_routes;
14pub mod cors;
15pub mod csrf;
16pub mod custom_fields;
17pub mod error;
18pub(crate) mod events;
19pub mod extractors;
20pub mod login_routes;
21pub mod logout_routes;
22pub mod mfa_page_routes;
23pub mod mfa_routes;
24pub mod middleware;
25pub mod nav;
26pub mod oauth_bearer;
27pub mod oauth_routes;
28#[cfg(test)]
29mod partials_tests;
30pub mod password_reset_page_routes;
31pub mod password_reset_routes;
32pub mod rate_limit;
33pub mod register_routes;
34pub mod settings_routes;
35pub mod shell_context;
36pub mod static_routes;
37pub mod token_route;
38pub mod userinfo_route;
39pub mod well_known_routes;
40
41pub use all_routes::{AllRoutesBuilder, AllRoutesError};
42pub use authorize_routes::{
43    AuthorizeOutcome, AuthorizeParams, ConsentContext, ConsentNeededData, ValidatedAuthorize,
44    authorize_post, check_authorization,
45};
46pub use bearer::BearerAuthUser;
47pub use branding::{
48    BrandingCtx, DEFAULT_ACCENT_HEX, DefaultBranding, derive_ink, lookup_branding, resolve_accent,
49    resolve_branding,
50};
51pub use browser_error::BrowserError;
52pub use browser_templates::{build_default_browser_env, render as render_template};
53pub use consent_routes::consent_routes;
54pub use cors::inject_ath_into_extensions;
55pub use csrf::{CsrfToken, csrf_middleware};
56pub use custom_fields::{CustomFieldDescriptor, CustomSchemaConfig, FieldType};
57pub use error::AuthExtractError;
58pub use extractors::{AuthUser, BrowserAdminUser, BrowserAuthUser, OptionalAuthUser};
59pub use login_routes::login_routes;
60pub use logout_routes::logout_routes;
61pub use mfa_page_routes::{mfa_challenge_routes, mfa_setup_routes};
62pub use mfa_routes::mfa_routes;
63pub use middleware::{require_auth, require_permission, require_role};
64pub use nav::{NavGroup, NavItem, nav_items_for};
65pub use oauth_bearer::{OAuthBearerError, OAuthBearerToken};
66pub use oauth_routes::oauth_routes;
67pub use password_reset_page_routes::password_reset_page_routes;
68pub use password_reset_routes::password_reset_routes;
69pub use rate_limit::{AuthRateLimiter, Quota, extract_client_ip};
70pub use register_routes::register_routes;
71pub use settings_routes::settings_routes;
72pub use shell_context::ShellContext;
73pub use static_routes::router as static_router;
74pub use token_route::token_route;
75pub use userinfo_route::userinfo_route;
76pub use well_known_routes::well_known_routes;