{"id":18715415,"url":"https://github.com/rawnly/auth0-jwt","last_synced_at":"2025-04-12T13:09:24.193Z","repository":{"id":64965053,"uuid":"580102613","full_name":"rawnly/auth0-jwt","owner":"rawnly","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-18T13:24:39.000Z","size":41,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T13:09:18.746Z","etag":null,"topics":["auth0","auth0-rust","jwt","rust","token"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/auth0-jwt","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rawnly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-19T18:16:03.000Z","updated_at":"2025-02-03T01:29:33.000Z","dependencies_parsed_at":"2023-01-13T15:00:08.852Z","dependency_job_id":null,"html_url":"https://github.com/rawnly/auth0-jwt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fauth0-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fauth0-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fauth0-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fauth0-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rawnly","download_url":"https://codeload.github.com/rawnly/auth0-jwt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571886,"owners_count":21126522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth0","auth0-rust","jwt","rust","token"],"created_at":"2024-11-07T13:08:39.040Z","updated_at":"2025-04-12T13:09:24.162Z","avatar_url":"https://github.com/rawnly.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auth0 JWT\n\u003e Auth0 utility to check if the given JWT is valid.\n\n## Usage\n```rust\nuse auth0_jwt::get_claims;\n\n#[tokio::async]\nasync fn main() {\n  let token = env!(\"JWT_TOKEN\");\n  let claims = get_claims(\u0026token).unwrap();\n\n  println!(\"Claims {}\", claims);\n}\n```\n\n## Features \n- `claims` - Exports the `Claims` struct which is useful for deserialization. \n- `axum` - Implements the `FromRequestParts\u003cT\u003e` trait for `Claims` and provides a `Token(String)` extractor for convenience.\n\n## Axum Example \nDetailed example [here](./examples/axum-hello-world)\n\n```rust\nuse auth0_jwt::claims::Claims;\nuse axum::{response::IntoResponse, routing::get, Json, Router};\nuse dotenv::dotenv;\nuse serde::{Deserialize, Serialize};\nuse std::net::SocketAddr;\n\n#[tokio::main]\nasync fn main() {\n    dotenv().ok();\n\n    // build our application with a route\n    let app = Router::new().route(\"/\", get(handler));\n\n    // run it\n    let addr = SocketAddr::from(([127, 0, 0, 1], 3000));\n    println!(\"listening on {}\", addr);\n    axum::Server::bind(\u0026addr)\n        .serve(app.into_make_service())\n        .await\n        .unwrap();\n}\n\n#[derive(Serialize)]\nstruct ResponseBody {\n    message: \u0026'static str,\n}\n\n#[derive(Deserialize, Serialize)]\nstruct ClaimsContent {\n    pub exp: usize,\n    pub iat: usize\n}\n\nasync fn handler(Claims(claims): Claims\u003cClaimsContent\u003e) -\u003e impl IntoResponse {\n    println!(\"{:?}\", claims.exp);\n\n    Json(ResponseBody {\n        message: \"hello world\",\n    })\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawnly%2Fauth0-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawnly%2Fauth0-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawnly%2Fauth0-jwt/lists"}