Struct oauth2::authz_server::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: String token_type: String expires_in: Option<u32> refresh_token: Option<String> scope: Option<String>

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

impl Debug for TokenData
[src]

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

Formats the value using the given formatter.