MCPcopy Create free account
hub / github.com/Keats/jsonwebtoken / aud_array_of_string_ok

Function aud_array_of_string_ok

src/validation.rs:704–712  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

702 #[test]
703 #[wasm_bindgen_test]
704 fn aud_array_of_string_ok() {
705 let claims = json!({"aud": ["UserA", "UserB"]});
706 let mut validation = Validation::new(Algorithm::HS256);
707 validation.validate_exp = false;
708 validation.required_spec_claims = HashSet::new();
709 validation.set_audience(&["UserA", "UserB"]);
710 let res = validate(deserialize_claims(&claims), &validation);
711 assert!(res.is_ok());
712 }
713
714 #[test]
715 #[wasm_bindgen_test]

Callers

nothing calls this directly

Calls 3

validateFunction · 0.85
deserialize_claimsFunction · 0.85
set_audienceMethod · 0.80

Tested by

no test coverage detected