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

Function aud_array_of_string_ok

src/validation.rs:714–722  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

712 #[test]
713 #[wasm_bindgen_test]
714 fn aud_array_of_string_ok() {
715 let claims = json!({"aud": ["UserA", "UserB"]});
716 let mut validation = Validation::new(Algorithm::HS256);
717 validation.validate_exp = false;
718 validation.required_spec_claims = HashSet::new();
719 validation.set_audience(&["UserA", "UserB"]);
720 let res = validate(deserialize_claims(&claims), &validation);
721 assert!(res.is_ok());
722 }
723
724 #[test]
725 #[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