mas_handlers/oauth2/keys.rs
1// Copyright 2024 New Vector Ltd.
2// Copyright 2021-2024 The Matrix.org Foundation C.I.C.
3//
4// SPDX-License-Identifier: AGPL-3.0-only
5// Please see LICENSE in the repository root for full details.
6
7use axum::{Json, extract::State, response::IntoResponse};
8use mas_keystore::Keystore;
9
10#[tracing::instrument(name = "handlers.oauth2.keys.get", skip_all)]
11pub(crate) async fn get(State(key_store): State<Keystore>) -> impl IntoResponse {
12 let jwks = key_store.public_jwks();
13 Json(jwks)
14}