You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/tokens/app_access_token.rs
+18-9Lines changed: 18 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,14 @@ use std::future::Future;
10
10
/// An App Access Token from the [OAuth client credentials flow](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-client-credentials-flow)
11
11
#[derive(Debug,Clone)]
12
12
pubstructAppAccessToken{
13
-
access_token:AccessToken,
14
-
refresh_token:Option<RefreshToken>,
15
-
expires:Option<std::time::Instant>,
13
+
/// The access token used to authenticate requests with
14
+
pubaccess_token:AccessToken,
15
+
/// The refresh token used to extend the life of this user token
16
+
pubrefresh_token:Option<RefreshToken>,
17
+
/// Expiration from when the response was generated.
18
+
expires_in:Option<std::time::Duration>,
19
+
/// When this struct was created, not when token was created.
20
+
struct_created: std::time::Instant,
16
21
client_id:ClientId,
17
22
client_secret:ClientSecret,
18
23
login:Option<String>,
@@ -36,19 +41,22 @@ impl TwitchToken for AppAccessToken {
0 commit comments