[−][src]Function jsonwebtoken::decode_header
pub fn decode_header(token: &str) -> Result<Header>
Decode a JWT without any signature verification/validations and return its Header.
If the token has an invalid format (ie 3 parts separated by a .
), it will return an error.
use jsonwebtoken::decode_header; let token = "a.jwt.token".to_string(); let header = decode_header(&token);