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

Function decode_header_only

tests/hmac.rs:272–277  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

270#[test]
271#[wasm_bindgen_test]
272fn decode_header_only() {
273 let token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55IjoiMTIzNDU2Nzg5MCIsInN1YiI6IkpvaG4gRG9lIn0.S";
274 let header = decode_header(token).unwrap();
275 assert_eq!(header.alg, Algorithm::HS256);
276 assert_eq!(header.typ, Some("JWT".to_string()));
277}
278
279#[test]
280#[wasm_bindgen_test]

Callers

nothing calls this directly

Calls 1

decode_headerFunction · 0.85

Tested by

no test coverage detected