Struct oauth2::token_data::TokenData [] [src]

pub struct TokenData {
    pub access_token: String,
    pub token_type: String,
    pub expires_in: Option<u32>,
    pub refresh_token: Option<String>,
    pub scope: Option<String>,
}

Fields

access_token
token_type
expires_in
refresh_token
scope

Methods

impl TokenData
[src]

fn as_json(&self) -> String

Serde serialization serializes all fields, even the ones that are None. But the standard suggests they should be left out entirely if they do not apply. This function skips fields that are None. JSON Serde deserializer will deserialize missing fields as None, so we can use serde for the reverse.

Trait Implementations

Derived Implementations

impl Debug for TokenData
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result