diff --git a/src/decoding.rs b/src/decoding.rs index 22ccf0d..a55bf6a 100644 --- a/src/decoding.rs +++ b/src/decoding.rs @@ -262,7 +262,6 @@ pub fn dangerous_insecure_decode_with_validation( Ok(TokenData { header, claims: decoded_claims }) } - /// Decode a JWT without any signature verification/validations and return its [Header](struct.Header.html). /// /// If the token has an invalid format (ie 3 parts separated by a `.`), it will return an error. diff --git a/src/errors.rs b/src/errors.rs index 403afe3..c78253a 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -123,6 +123,12 @@ impl fmt::Display for Error { } } +impl PartialEq for ErrorKind { + fn eq(&self, other: &Self) -> bool { + format!("{:?}", self) == format!("{:?}", other) + } +} + impl From for Error { fn from(err: base64::DecodeError) -> Error { new_error(ErrorKind::Base64(err))