pub fn role_auth(
what: &str,
section: &AuthSection,
address: SocketAddr,
ui_token_file: Option<&Path>,
timings: AuthTimings,
) -> Result<Auth, AppError>Expand description
Who the user is for the role what (webserver, ui) listening on address, by section; a
UI trusted by the token in ui_token_file. The safety rules (see archive/PROJECT.md,
Authentication): proxy_header beyond a loopback address only with allow_remote (anything
reaching it around the proxy could name any user), basic only with behind_tls_proxy
(passwords would cross the network in the clear).
§Errors
AppError::BadArgument when a rule refuses it, or the token or users can’t be read.