pub struct Front {
pub base_url: Option<String>,
pub login: Option<Login>,
}Expand description
What /-/front answers: everything on the page that is a fact about THIS
server rather than about holger.
Fields§
§base_url: Option<String>The base URL a package manager is pointed at. None when the server
was not told its own public name — printed by the server or not at all,
because a page that guessed it from location.origin would print the
proxy’s address on any deployment behind one.
login: Option<Login>★ None is an ANSWER, and it is the honest one today.
holger-server authenticates with mTLS, OIDC and bearer tokens — doors
for cargo, pip, docker and the native console. There is no
browser session, so there is no button, and the page says
ec::FRONT_NO_BROWSER_LOGIN by name rather than offering one.
It is serialised even when null (no skip_serializing_if) precisely so
the page can tell a server with no login from a server too old to have
the field.
Implementations§
Source§impl Front
impl Front
Sourcepub fn anonymous(base_url: Option<String>) -> Self
pub fn anonymous(base_url: Option<String>) -> Self
A server that has told us nothing but its own address.
Sourcepub fn no_login_refusal() -> String
pub fn no_login_refusal() -> String
The refusal the page prints when Front::login is None, by name
and with its code. Kept here rather than only in the page’s JavaScript
so the words exist in one place and a test can hold them to it.