pub async fn do_bearer_auth<T: BearerAuthBackendApi + ?Sized>(
api: &T,
now: SystemTime,
user_key_pair: &KeyPair,
lifetime_secs: u32,
scope: Option<Scope>,
) -> Result<TokenWithExpiration, BackendApiError>Expand description
Create a new short-lived BearerAuthRequest, sign it, and send the
request. Returns the TokenWithExpiration if the auth request
succeeds.