summaryrefslogtreecommitdiff
path: root/internal/oauth/token.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-28 14:09:28 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-28 14:12:48 +0100
commit59e6ccd051452162fab852a25deb4f0f8a9e22b2 (patch)
treef4d8168b5b696f0eae26dbfc0e6cae514cbe65e7 /internal/oauth/token.go
parent279c0de75629de5868c3ac1b3272a2850e6b62f7 (diff)
Refactor: Fix revive linter errors by deleting redundant prefixes
Diffstat (limited to 'internal/oauth/token.go')
-rw-r--r--internal/oauth/token.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/oauth/token.go b/internal/oauth/token.go
index 8ceb9a8..eb79357 100644
--- a/internal/oauth/token.go
+++ b/internal/oauth/token.go
@@ -2,8 +2,8 @@ package oauth
import "time"
-// OAuthTokenResponse defines the OAuth response from the server that includes the tokens.
-type OAuthTokenResponse struct {
+// TokenResponse defines the OAuth response from the server that includes the tokens.
+type TokenResponse struct {
// Access is the access token returned by the server
Access string `json:"access_token"`
@@ -18,8 +18,8 @@ type OAuthTokenResponse struct {
}
-// OAuthToken is a structure that contains our access and refresh tokens and a timestamp when they expire.
-type OAuthToken struct {
+// Token is a structure that contains our access and refresh tokens and a timestamp when they expire.
+type Token struct {
// Access is the access token returned by the server
access string
@@ -31,7 +31,7 @@ type OAuthToken struct {
}
// Expired checks if the access token is expired.
-func (tokens *OAuthToken) Expired() bool {
+func (tokens *Token) Expired() bool {
currentTime := time.Now()
return !currentTime.Before(tokens.expiredTimestamp)
}