1 unstable release
0.2.0 | Sep 22, 2024 |
---|
#14 in #token-parser
195 downloads per month
32KB
787 lines
Parse and validate Google JWT tokens
#[derive(Debug, Serialize, Deserialize)]
pub struct TokenClaims {
pub email: String,
pub aud: String,
pub iss: String,
pub exp: u64,
}
async fn main() {
let parser = Parser::new();
parser.add_client_id("some-google-web-client-id");
let claims = parser.parse::<TokenClaims>("some-token").await.unwrap();
}
Dependencies
~21–35MB
~660K SLoC