1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* ORY Hydra
*
* Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
*
* The version of the OpenAPI document: latest
*
* Generated by: https://openapi-generator.tech
*/
/// OauthTokenResponse : The token response
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct OauthTokenResponse {
/// The access token issued by the authorization server.
#[serde(rename = "access_token", skip_serializing_if = "Option::is_none")]
pub access_token: Option<String>,
/// The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated.
#[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")]
pub expires_in: Option<i64>,
/// To retrieve a refresh token request the id_token scope.
#[serde(rename = "id_token", skip_serializing_if = "Option::is_none")]
pub id_token: Option<i64>,
/// The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request.
#[serde(rename = "refresh_token", skip_serializing_if = "Option::is_none")]
pub refresh_token: Option<String>,
/// The scope of the access token
#[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
pub scope: Option<i64>,
/// The type of the token issued
#[serde(rename = "token_type", skip_serializing_if = "Option::is_none")]
pub token_type: Option<String>,
}
impl OauthTokenResponse {
/// The token response
pub fn new() -> OauthTokenResponse {
OauthTokenResponse {
access_token: None,
expires_in: None,
id_token: None,
refresh_token: None,
scope: None,
token_type: None,
}
}
}