httpclient_oauth2 0.6.0

A simple OAuth2 client library for Rust. Provides middleware for httpclient.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::{Deserialize, Serialize};

use crate::middleware::TokenType;

#[derive(Debug)]
pub struct RefreshConfig {
}

/// Response when requesting a new access token using a refresh token.
#[derive(Debug, Serialize, Deserialize)]
pub(crate) struct RefreshResponse {
    pub access_token: String,
    pub expires_in: u64,
    pub scope: Option<String>,
    pub token_type: TokenType,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub refresh_token: Option<String>,
}