()
| 130 | } |
| 131 | |
| 132 | getCachedToken() { |
| 133 | const cache = readTokenCache(); |
| 134 | const item = cache[this.cacheKey()]; |
| 135 | if (!item?.authorization || !item?.expiresAt) return ""; |
| 136 | if (Date.now() > Number(item.expiresAt) - 5 * 60 * 1000) return ""; |
| 137 | return item.authorization; |
| 138 | } |
| 139 | |
| 140 | saveCachedToken() { |
| 141 | if (!this.authorization) return; |
no test coverage detected