jsonwebtoken-jwks-cache 0.4.0

Resilient and blazingly fast async JWK Set cache
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::PemMap;
use serde_json::from_str;

const PKEYS: &str = include_str!("../../publicKeys-sample.json");

#[test]
fn test_pem_map() {
    let pem_map: PemMap = from_str(PKEYS).unwrap();

    assert_eq!(pem_map.0.len(), 3);

    let jwks = pem_map.into_rsa_jwk_set();

    assert_eq!(jwks.keys.len(), 3);
}