You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
Use associated error type in claims validator instead of anyhow.
This commit is contained in:
@ -23,7 +23,7 @@ use mas_axum_utils::client_authorization::{ClientAuthorization, CredentialsVerif
|
||||
use mas_data_model::{AuthorizationGrantStage, Client, TokenType};
|
||||
use mas_iana::jose::JsonWebSignatureAlg;
|
||||
use mas_jose::{
|
||||
claims::{self, hash_token, ClaimError},
|
||||
claims::{self, hash_token, ClaimError, TokenHashError},
|
||||
constraints::Constrainable,
|
||||
jwt::{JsonWebSignatureHeader, Jwt, JwtSignatureError},
|
||||
};
|
||||
@ -177,6 +177,12 @@ impl From<ClaimError> for RouteError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<TokenHashError> for RouteError {
|
||||
fn from(e: TokenHashError) -> Self {
|
||||
Self::Internal(Box::new(e))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<JwtSignatureError> for RouteError {
|
||||
fn from(e: JwtSignatureError) -> Self {
|
||||
Self::Internal(Box::new(e))
|
||||
|
Reference in New Issue
Block a user