parent
5c706b005a
commit
d2c8ae3f11
|
@ -262,7 +262,6 @@ pub fn dangerous_insecure_decode_with_validation<T: DeserializeOwned>(
|
|||
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.
|
||||
|
|
|
@ -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<base64::DecodeError> for Error {
|
||||
fn from(err: base64::DecodeError) -> Error {
|
||||
new_error(ErrorKind::Base64(err))
|
||||
|
|
Loading…
Reference in New Issue