use actix_web::{web, App, HttpServer, Responder}; use clerk_rs::{ clerk::Clerk, validators::{actix::ClerkMiddleware, jwks::MemoryCacheJwksProvider}, ClerkConfiguration, }; async fn index() -> impl Responder { "Hello world!" } #[actix_web::main] async fn main() -> std::io::Result<()> { HttpServer::new(|| { let config = ClerkConfiguration::new(None, None, Some("your_secret_key".to_string()), None); let clerk = Clerk::new(config); App::new() .wrap(ClerkMiddleware::new(MemoryCacheJwksProvider::new(clerk), None, true)) .route("/index", web::get().to(index)) }) .bind(("127.0.0.1", 8080))? .run() .await }