()
| 119 | } |
| 120 | |
| 121 | saveCachedToken() { |
| 122 | if (!this.authorization) return; |
| 123 | const cache = readTokenCache(); |
| 124 | cache[this.cacheKey()] = { |
| 125 | accessToken: this.accessToken, |
| 126 | authorization: this.authorization, |
| 127 | userId: this.userInfo.userId || "", |
| 128 | nickName: this.userInfo.nickName || "", |
| 129 | userMobile: this.userInfo.userMobile || "", |
| 130 | updatedAt: new Date().toISOString(), |
| 131 | }; |
| 132 | writeTokenCache(cache); |
| 133 | } |
| 134 | |
| 135 | removeCachedToken() { |
| 136 | const cache = readTokenCache(); |
no test coverage detected