Skip to content

Commit

Permalink
add comment around expiry
Browse files Browse the repository at this point in the history
  • Loading branch information
billiford committed Mar 26, 2021
1 parent 0c6ba6d commit 608c541
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/http/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func getGoogleToken(c *gin.Context) {
}

// Set the expiration for the Google token to be 90% expiry-threshold.
// Expiry looks something like '2021-03-26 15:53:24.513497 -0400 EDT m=+3599.302993422'
googleExpiration = time.Now().UTC().Add((time.Until(googleToken.Expiry) / 10) * 9)
}

Expand Down

0 comments on commit 608c541

Please sign in to comment.