1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-09 04:22:45 +03:00

Axum migration: /oauth2/introspection

This commit is contained in:
Quentin Gliech
2022-04-05 08:21:31 +02:00
parent ed49624c3a
commit 0f7484beee
7 changed files with 145 additions and 77 deletions

View File

@@ -132,8 +132,8 @@ impl Credentials {
.ok_or(CredentialsVerificationError::InvalidClientConfig)?;
let store: Either<StaticJwksStore, DynamicJwksStore> = jwks_key_store(jwks);
jwt.verify(header, &store)
.await
let fut = jwt.verify(header, &store);
fut.await
.map_err(|_| CredentialsVerificationError::InvalidAssertionSignature)?;
}
@@ -152,8 +152,8 @@ impl Credentials {
.map_err(|_e| CredentialsVerificationError::DecryptionError)?;
let store = SharedSecret::new(&decrypted_client_secret);
jwt.verify(header, &store)
.await
let fut = jwt.verify(header, &store);
fut.await
.map_err(|_| CredentialsVerificationError::InvalidAssertionSignature)?;
}
@@ -181,8 +181,8 @@ pub enum CredentialsVerificationError {
#[derive(Debug, PartialEq, Eq)]
pub struct ClientAuthorization<F = ()> {
credentials: Credentials,
form: Option<F>,
pub credentials: Credentials,
pub form: Option<F>,
}
#[derive(Debug)]