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

Get rid of legacy JWKS store

This commit is contained in:
Quentin Gliech
2022-08-29 18:29:22 +02:00
parent 84c793dae0
commit 2c400d4cc1
16 changed files with 328 additions and 889 deletions

View File

@@ -16,12 +16,10 @@ use std::{convert::Infallible, sync::Arc};
use axum::{extract::Extension, response::IntoResponse, Json};
use mas_jose::StaticKeystore;
use tower::{Service, ServiceExt};
pub(crate) async fn get(
Extension(key_store): Extension<Arc<StaticKeystore>>,
) -> Result<impl IntoResponse, Infallible> {
let mut key_store: &StaticKeystore = key_store.as_ref();
let jwks = key_store.ready().await?.call(()).await?;
let jwks = key_store.to_public_jwks();
Ok(Json(jwks))
}