#google #jwt #sign #token #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

#368 in Cryptography

Download history 133/week @ 2022-06-11 152/week @ 2022-06-18 151/week @ 2022-06-25 78/week @ 2022-07-02 78/week @ 2022-07-09 181/week @ 2022-07-16 233/week @ 2022-07-23 200/week @ 2022-07-30 190/week @ 2022-08-06 207/week @ 2022-08-13 204/week @ 2022-08-20 214/week @ 2022-08-27 212/week @ 2022-09-03 265/week @ 2022-09-10 224/week @ 2022-09-17 160/week @ 2022-09-24

886 downloads per month

MIT/Apache

17KB
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

~14–25MB
~566K SLoC