Skip to content

avkviring/jsonwebtoken-google

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();
}