summaryrefslogtreecommitdiff
path: root/src/oauth.go
diff options
context:
space:
mode:
authorJeroen Wijenbergh <jeroenwijenbergh@protonmail.com>2022-03-21 17:16:28 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-03-21 17:16:28 +0100
commit324202a50e440cac36a756d6a2628ebadd2f8d70 (patch)
tree10381dc1e490eddb3b446a8f3ce599493f87d26d /src/oauth.go
parentfc56f8770923ec1997444a8318a18be0a8397520 (diff)
Update python and add basic config support
Diffstat (limited to 'src/oauth.go')
-rw-r--r--src/oauth.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/oauth.go b/src/oauth.go
index 063034b..eb93c00 100644
--- a/src/oauth.go
+++ b/src/oauth.go
@@ -54,9 +54,9 @@ func genVerifier() (string, error) {
}
type OAuth struct {
- Session *OAuthExchangeSession
- Token *OAuthToken
- TokenURL string
+ Session *OAuthExchangeSession `json:"-"`
+ Token *OAuthToken `json:"token"`
+ TokenURL string `json:"token_url"`
}
// This structure gets passed to the callback for easy access to the current state
@@ -85,7 +85,7 @@ type OAuthToken struct {
Refresh string `json:"refresh_token"`
Type string `json:"token_type"`
Expires int64 `json:"expires_in"`
- ExpiredTimestamp int64
+ ExpiredTimestamp int64 `json:"expires_in_timestamp"`
}
// Gets an authenticated HTTP client by obtaining refresh and access tokens