#jwt #google #token #android #sign

jsonwebtoken-google

parse and validate google jwt token with jsonwebtoken

7 releases

0.1.6 Feb 27, 2022
0.1.5 Feb 27, 2022
0.1.3 Jan 26, 2022
0.1.2 Nov 4, 2021
0.1.1 Mar 5, 2021

#1943 in Cryptography

Download history 742/week @ 2024-04-07 619/week @ 2024-04-14 697/week @ 2024-04-21 502/week @ 2024-04-28 223/week @ 2024-05-05 557/week @ 2024-05-12 283/week @ 2024-05-19 293/week @ 2024-05-26 427/week @ 2024-06-02 303/week @ 2024-06-09 350/week @ 2024-06-16 565/week @ 2024-06-23 808/week @ 2024-06-30 483/week @ 2024-07-07 441/week @ 2024-07-14 363/week @ 2024-07-21

2,160 downloads per month

MIT/Apache

18KB
372 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("some-google-web-client-id");
    let claims = parser.parse::<TokenClaims>("some-token").await.unwrap();
}

Dependencies

~17–37MB
~679K SLoC