diff options
Diffstat (limited to 'src/token/extract/identity.rs')
| -rw-r--r-- | src/token/extract/identity.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/token/extract/identity.rs b/src/token/extract/identity.rs index 5c004ef..59f1dfb 100644 --- a/src/token/extract/identity.rs +++ b/src/token/extract/identity.rs @@ -40,7 +40,7 @@ where .await .map_err(|err| match err { ValidateError::InvalidToken => LoginError::Unauthorized, - other => other.into(), + ValidateError::Failed(failed) => failed.into(), }) } } @@ -59,7 +59,7 @@ where match <Self as FromRequestParts<App>>::from_request_parts(parts, state).await { Ok(identity) => Ok(Some(identity)), Err(LoginError::Unauthorized) => Ok(None), - Err(other) => Err(other), + Err(LoginError::Failure(other)) => Err(LoginError::Failure(other)), } } } |
