pub enum Door {
Link,
Here,
}Expand description
★ WHICH OF THE THREE STATES the door is in — the third one is new.
There were two: no login at all (Front::login is None), and a login
somewhere else on this origin (a link the button follows). Neither of them
is what holger.rs needs, because on holger.rs the console IS this origin:
the link sent a visitor to /login, a second page with the same button on
it, and the reader pressed the same thing twice to reach one ceremony.
So there is a third: the ceremony runs on this page. The page holds the
WebAuthn call itself — navigator.credentials.get against the paths the
server names — and there is no navigation until it has succeeded.
It is a field and not a separate type because the airgapped appliance
serves this same crate with /auth/* absent entirely. The appliance
answers Door::Link or None and the ceremony code on the page is never
reached; nothing about the ceremony is compiled into the appliance’s
choices, it is markup and script that a server has to opt into by naming
three paths.
Variants§
Link
The button is a link: press it and the browser goes to start.
The default, and it is the default on purpose: a /-/front document
written before this field existed deserialises as a link, which is what
it was.
Here
The ceremony is HERE. start, finish and next are all rooted paths
on this origin and the page never leaves until finish said yes.