We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3ed0bb commit ec647e7Copy full SHA for ec647e7
token.go
@@ -19,7 +19,12 @@ import (
19
// expiryDelta determines how earlier a token should be considered
20
// expired than its actual expiration time. It is used to avoid late
21
// expirations due to client-server time mismatches.
22
-const expiryDelta = 10 * time.Second
+var expiryDelta = 10 * time.Second
23
+
24
+// make expiryDelta configurable
25
+func SetExpiryDelta(seconds int){
26
+ expiryDelta = time.Duration(seconds) * time.Second
27
+}
28
29
// Token represents the credentials used to authorize
30
// the requests to access protected resources on the OAuth 2.0
0 commit comments