pub fn console_login(path: &str) -> Option<Login>Expand description
★ The console door, or None — and None is the answer for anything the
PAGE would refuse to follow.
The page’s button follows only a same-site rooted path (see the btn.onclick
guard in assets/front.html), which is the open-redirect defence and is not
negotiable. So an operator who points this at https://console.example.com
would get a button that is enabled, labelled, and does nothing at all on
click — strictly worse than the honest dead button
Front::no_login_refusal explains, because there is no sentence anywhere
saying why.
This constructor therefore applies the page’s own rule server-side, and
answers None for every value the page would silently drop. The two rules
are asserted equal by
[the_rust_rule_and_the_pages_rule_refuse_the_same_values] — one rule, two
languages, held together the way this crate holds its sentences together.
Note what this means for a deployment, because it is a real constraint and not a detail: the console must be reachable at a path on THIS server’s origin. A console on its own host has no rooted path from here, and the honest answer for it is the one the page already gives.