Crates.io | id_token_parser |
lib.rs | id_token_parser |
version | 0.2.0 |
source | src |
created_at | 2024-09-22 19:07:04.272507 |
updated_at | 2024-09-22 19:07:04.272507 |
description | Parse and validate third party jwt token with jsonwebtoken |
homepage | |
repository | https://github.com/normano/signin-rs |
max_upload_size | |
id | 1383209 |
size | 46,607 |
#[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();
}