pub fn operator_credential(
config: &ServerConfig,
) -> Result<(OperatorCredential, Vec<String>), StartError>Expand description
The operator credential this start serves under, and the warnings it owes.
The legacy plaintext is taken out of the state directory first. Then
api.credential_verifier when it is configured, a plaintext
api.credential when that is all the configuration carries, the verifier
file in the state directory, and otherwise nothing — a fresh install, which
supervises and admits no operator until one is issued. A plaintext
api.credential warns whether or not a verifier wins over it.
§Errors
Returns StartError::Credential naming the file, and never what it
holds, when the legacy plaintext cannot be taken out or the verifier file
cannot be read as one.