appguard-client-authentication 0.3.1

Library for AppGuard clients authentication
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{context::Context, token_provider::RetrievalStrategy};
use std::time::Duration;

pub async fn post_startup(context: Context) {
    let timeout = Duration::from_secs(10);

    let token = context
        .token_provider
        .obtain(RetrievalStrategy::Await(timeout))
        .await;

    if token.is_none() {
        log::error!("Failed to obtain auth token");
    }
}