[][src]Struct google_signin::Client

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.

Auto Trait Implementations

impl Unpin for Client

impl Sync for Client

impl Send for Client

impl !UnwindSafe for Client

impl !RefUnwindSafe for Client

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any
[src]

fn get_type(&self) -> TypeId[src]

Get the TypeId of this object.