Skip to main content

allowthem_server/
server.rs

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