bubblehearth 0.1.0

Blizzard Game Data API bindings for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Contextual caching for authentication, allowing resuability of access tokens and smart token refreshing.

use serde::{Deserialize, Serialize};

/// Represents the access token response at the token endpoint based on the client region.
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AccessTokenResponse {
    /// Represents the access token used to authenticate against Blizzard APIs.
    pub access_token: String,
    /// OAuth-based token type, usually a bearer.
    pub token_type: String,
    /// Number of seconds until the token expires, usually defaulting to 1 day.
    pub expires_in: u64,
    /// Subscriber of the authentication request, defaults to the client ID of the request.
    pub sub: String,
    /// Optional scope associated to the token, mainly used for user profile data.
    pub scope: Option<String>,
}