Commit 935dae6
feat(go-sdk): Automatically refresh expired authentication tokens (#1608)
The Looker Go SDK was not automatically refreshing expired
authentication tokens, causing authentication to fail after one hour.
This change modifies the AuthSession to proactively manage the token's
lifecycle. An IsActive method was added to check the token's validity,
and a Login method was added to refresh the token when needed. The Do
method was updated to call Login before making any API requests,
ensuring the token is always active.
Fixes #1606 🦕
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent 9b596f3 commit 935dae6
1 file changed
+50
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
42 | 84 | | |
43 | 85 | | |
44 | 86 | | |
| |||
74 | 116 | | |
75 | 117 | | |
76 | 118 | | |
| 119 | + | |
| 120 | + | |
77 | 121 | | |
78 | 122 | | |
79 | | - | |
| 123 | + | |
80 | 124 | | |
81 | 125 | | |
82 | 126 | | |
83 | 127 | | |
84 | 128 | | |
85 | 129 | | |
86 | 130 | | |
| 131 | + | |
87 | 132 | | |
88 | 133 | | |
89 | 134 | | |
90 | 135 | | |
91 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
92 | 140 | | |
93 | 141 | | |
94 | 142 | | |
| |||
0 commit comments