1 unstable release
0.2.0 | Sep 22, 2024 |
---|
#752 in Authentication
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–36MB
~660K SLoC