pub fn get_preferred_username(token: &str) -> Result<String, MantaError>Expand description
Extract the preferred_username claim from a JWT token.
Returns "MISSING" if the claim is absent.
ยงErrors
Returns MantaError::JwtMalformed when token does not parse
as header.payload.signature Base64, or when the payload is not
valid UTF-8 JSON.