pub async fn verify_token(
client: &KanidmClient,
metrics: &ControllerMetrics,
account: &str,
bearer: &Bearer,
retry: VerifyRetry,
) -> ExecResult<()>Expand description
Promotion gate: authenticate to Kanidm with the candidate token
alone. KanidmClient::new_session copies the cached client’s address and
TLS settings but not its bearer, so a success proves the candidate itself.
A 401 (whoami returns None) is retried like a transient error, then
reported as ExecError::CandidateRejected. Transport and server errors
that persist through the retries are returned with their source.