use clerk_rs::{ clerk::Clerk, validators::{ jwks::MemoryCacheJwksProvider, rocket::{ClerkGuard, ClerkGuardConfig}, }, ClerkConfiguration, }; use rocket::{ get, launch, routes, serde::{Deserialize, Serialize}, }; #[derive(Serialize, Deserialize)] struct Message { content: String, } #[get("/")] fn index(jwt: ClerkGuard) -> &'static str { "Hello world!" } #[launch] fn rocket() -> _ { let config = ClerkConfiguration::new(None, None, Some("sk_test_F9HM5l3WMTDMdBB0ygcMMAiL37QA6BvXYV1v18Noit".to_string()), None); let clerk = Clerk::new(config); let clerk_config = ClerkGuardConfig::new( MemoryCacheJwksProvider::new(clerk), None, true, // validate_session_cookie ); rocket::build().mount("/", routes![index]).manage(clerk_config) }