1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

WIP: better JOSE

This commit is contained in:
Quentin Gliech
2022-08-23 17:45:23 +02:00
parent 495285162b
commit ca125a14c5
16 changed files with 690 additions and 157 deletions

View File

@@ -26,7 +26,7 @@ use mas_data_model::{AuthorizationGrantStage, Client, TokenType};
use mas_iana::jose::JsonWebSignatureAlg;
use mas_jose::{
claims::{self, ClaimError},
DecodedJsonWebToken, SigningKeystore, StaticKeystore,
DecodedJsonWebToken, JwtSignatureError, SigningKeystore, StaticKeystore,
};
use mas_router::UrlBuilder;
use mas_storage::{
@@ -173,6 +173,12 @@ impl From<ClaimError> for RouteError {
}
}
impl From<JwtSignatureError> for RouteError {
fn from(e: JwtSignatureError) -> Self {
Self::Internal(Box::new(e))
}
}
#[tracing::instrument(skip_all, err)]
pub(crate) async fn post(
client_authorization: ClientAuthorization<AccessTokenRequest>,