Google JSON Web Token Verify

Build Status crates.io documentation

This can be used to verify Google JWT tokens. Google's public keys are automatically fetched and cached according to the returned Cache-Control headers. Most requests to verify a token through this library will not wait for an HTTP request

For more info: https://developers.google.com/identity/sign-in/web/backend-auth

Quick Start

```rust //If you don't have a client id, get one from here: https://console.developers.google.com/ let clientid = "37772117408-qjqo9hca513pdcunumt7gk08ii6te8is.apps.googleusercontent.com"; let token = "...";// Obtain a signed token from Google let client = Client::new(&clientid); let idtoken = client.verifyid_token(&token)?;

//use the token to obtain information about the verified user let userid = idtoken.getclaims().getsubject(); let email = idtoken.getpayload().getemail(); let name = idtoken.getpayload().getname(); ```