Struct google_signin::Client
[−]
[src]
pub struct Client { pub audiences: Vec<String>, pub hosted_domains: Vec<String>, // some fields omitted }
Fields
audiences: Vec<String>
hosted_domains: Vec<String>
Methods
impl Client
[src]
pub fn new() -> Client
[src]
pub fn verify(&self, id_token: &str) -> Result<IdInfo, Error>
[src]
Verifies that the token is signed by Google's OAuth cerificate, and check that it has a valid issuer, audience, and hosted domain.
Returns an error if the client has no configured audiences.
pub fn get_slow_unverified(&self, id_token: &str) -> Result<IdInfo, Error>
[src]
Checks the token using Google's slow OAuth-like authentication flow.
This checks that the token is signed using Google's OAuth certificate, but does not check the issuer, audience, or other application-specific verifications.
This is NOT the recommended way to use the library, but can be used in combination with IdInfo.verify for applications with more complex error-handling requirements.