Skip to main content

allowthem_server/
server.rs

1// allowthem-server: HTTP routes, middleware, and extractors
2
3pub mod all_routes;
4pub mod authorize_routes;
5pub mod bearer;
6pub mod branding;
7pub mod browser_error;
8pub mod browser_templates;
9pub mod consent_routes;
10pub mod csrf;
11pub mod custom_fields;
12pub mod error;
13pub(crate) mod events;
14pub mod extractors;
15pub mod login_routes;
16pub mod logout_routes;
17pub mod mfa_page_routes;
18pub mod mfa_routes;
19pub mod middleware;
20pub mod oauth_bearer;
21pub mod oauth_routes;
22pub mod password_reset_page_routes;
23pub mod password_reset_routes;
24pub mod rate_limit;
25pub mod register_routes;
26pub mod settings_routes;
27pub mod token_route;
28pub mod userinfo_route;
29pub mod well_known_routes;
30
31pub use all_routes::{AllRoutesBuilder, AllRoutesError};
32pub use authorize_routes::{
33    AuthorizeOutcome, AuthorizeParams, ConsentContext, ConsentNeededData, ValidatedAuthorize,
34    authorize_post, check_authorization,
35};
36pub use bearer::BearerAuthUser;
37pub use branding::{compute_accent_variants, default_accents, lookup_branding};
38pub use browser_error::BrowserError;
39pub use browser_templates::{build_default_browser_env, render as render_template};
40pub use consent_routes::consent_routes;
41pub use csrf::{CsrfToken, csrf_middleware};
42pub use custom_fields::{CustomFieldDescriptor, CustomSchemaConfig, FieldType};
43pub use error::AuthExtractError;
44pub use extractors::{AuthUser, BrowserAdminUser, BrowserAuthUser, OptionalAuthUser};
45pub use login_routes::login_routes;
46pub use logout_routes::logout_routes;
47pub use mfa_page_routes::{mfa_challenge_routes, mfa_setup_routes};
48pub use mfa_routes::mfa_routes;
49pub use middleware::{require_auth, require_permission, require_role};
50pub use oauth_bearer::{OAuthBearerError, OAuthBearerToken};
51pub use oauth_routes::oauth_routes;
52pub use password_reset_page_routes::password_reset_page_routes;
53pub use password_reset_routes::password_reset_routes;
54pub use rate_limit::{AuthRateLimiter, Quota, extract_client_ip};
55pub use register_routes::register_routes;
56pub use settings_routes::settings_routes;
57pub use token_route::token_route;
58pub use userinfo_route::userinfo_route;
59pub use well_known_routes::well_known_routes;