usso 0.2.6

The usso provides a universal single sign-on (SSO) integration for microservices, making it easy to add secure, scalable authentication across different frameworks. This client simplifies the process of connecting any microservice to the USSO service.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[cfg(test)]
mod tests {
    use dotenvy::dotenv;
    use std::env;
    use usso::jwks::{get_jwk_keys, init_jwks_sync};

    #[test]
    fn fetch_jwks() {
        dotenv().ok();
        let jwk_url = env::var("JWKS_URL").expect("Missing JWKS_URL");
        init_jwks_sync(&jwk_url).expect("Can't init JWKS");
        let jwks = get_jwk_keys().expect("Can't get JWKS");
        assert!(!jwks.keys.is_empty());
        assert!(jwks.keys.len() > 0);
    }
}