id_token_parser

Crates.ioid_token_parser
lib.rsid_token_parser
version0.2.0
sourcesrc
created_at2024-09-22 19:07:04.272507
updated_at2024-09-22 19:07:04.272507
descriptionParse and validate third party jwt token with jsonwebtoken
homepage
repositoryhttps://github.com/normano/signin-rs
max_upload_size
id1383209
size46,607
Norm O (normano)

documentation

https://docs.rs/signin-rs

README

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();
}
Commit count: 23

cargo fmt