feat: fetch keycloak jwks + cache

This commit is contained in:
2026-04-09 12:47:09 +02:00
commit 5eb8da88f8
8 changed files with 2296 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
mod auth;
use crate::auth::{keycloak, jwt};
use axum::{
extract::Request,
http::{HeaderMap, StatusCode},
routing::get,
Router,
};
use dotenvy::dotenv;
use std::env;
#[tokio::main]
async fn main() {
dotenv().ok();
let jwks = keycloak::get_jwks().await;
println!("{:?}", jwks);
// let app = Router::new().route("/protected", get(protected_route))
// .route("/", get(dumb));
// let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
// println!("Server running on {}", addr);
// axum::serve(tokio::net::TcpListener::bind(addr).await.unwrap(), app)
// .await
// .unwrap();
}