#jwt #token #google #sign #android

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

#1970 in Cryptography

Download history 364/week @ 2024-07-20 198/week @ 2024-07-27 421/week @ 2024-08-03 324/week @ 2024-08-10 342/week @ 2024-08-17 396/week @ 2024-08-24 291/week @ 2024-08-31 195/week @ 2024-09-07 101/week @ 2024-09-14 268/week @ 2024-09-21 169/week @ 2024-09-28 161/week @ 2024-10-05 348/week @ 2024-10-12 157/week @ 2024-10-19 167/week @ 2024-10-26 158/week @ 2024-11-02

848 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

~18–35MB
~669K SLoC