Re-exportsΒ§
use std::fmt::Write;πuse std::net::IpAddr;πuse axum::extract::Form;πuse axum::extract::Request;πuse axum::extract::State;πuse axum::response::Redirect;πuse axum::response::Response;πuse const_str::format as const_format;πuse http::StatusCode;πuse itertools::Either::Left;πuse itertools::Either::Right;πuse ruma::OwnedUserId;πuse ruma::UserId;πuse serde::Deserialize;πuse serde::Deserialize;πuse serde_json::json;πuse tuwunel_api::router::ACCOUNT_HEAD;πuse tuwunel_core::Err;πuse tuwunel_core::Error;πuse tuwunel_core::Result;πuse tuwunel_core::config::IdentityProvider;πuse tuwunel_core::err;πuse tuwunel_core::smallstr::SmallString;πuse tuwunel_core::utils;πuse tuwunel_core::utils::BoolExt;πuse tuwunel_core::utils::hash::verify_password;πuse tuwunel_core::utils::html::escape as html_escape;πuse tuwunel_service::Services;πuse tuwunel_service::users::Register;πuse url::Url;πuse super::account::account_error_response;πuse super::account::account_html_response;πuse super::account::account_redirect_response;πuse super::account::account_sso_redirect;πuse super::account::validate_account_action;πuse super::device::device_sso_redirect;πuse super::require_account_usable;πuse super::url_encode;πuse crate::ClientIp;πuse crate::RateLimitIp;π
StructsΒ§
- Native
Query π - Native
Submit π
EnumsΒ§
- Flow π
- Password
Auth π - Password authentication the login page offers beside the providers.
ConstantsΒ§
- LOGIN_
TOKEN_ πLENGTH
StaticsΒ§
- BOUND_
HTML π - LOGIN_
HTML π - PASSWORD_
FORM π - REGISTER_
HTML π - TOKEN_
FIELD π
FunctionsΒ§
- authenticate_
local π - Authenticate through the local branch of an authorization request.
- complete_
redirect π - Redirects with 303 so the browser cannot replay the password form into the completion or callback route.
- configured_
password_ πauth - do_
register π - error_
block π - native_
get_ πroute - Renders the native login or registration page for a pending authorization, device, or account flow.
- native_
submit π - native_
submit_ πroute - Authenticates submitted credentials and sends the login token to the authorization completion, device-consent, or account-management callback.
- parse_
flow π - provider_
choice π - provider_
redirect π - Send the browser to the provider chosen on the login page.
- record_
accepted_ πterms - render_
bound π - Offer only the provider a pending request is bound to.
- render_
login π - render_
page π - Render the page for a flow, reading an authorization requestβs binding.
- render_
register π - render_
sso_ πoptions - List each provider as a link that preserves the authentication flow.
- render_
submit_ πerror - Re-render the page a failed submission came from, carrying its error.
- require_
native π - sso_
choices π - Providers the login page offers, as the client login flows list them.
- terms_
block π - verify_
credentials π - Authenticate a local account by password, mirroring the
/loginpassword flow (password_login).
Type AliasesΒ§
- Account
Action π - Device
Id π - IdpId π
- Login
Address π - Provider
Choice π