()
| 126 | } |
| 127 | |
| 128 | saveCachedToken() { |
| 129 | if (!this.session.token) return; |
| 130 | const cache = readTokenCache(); |
| 131 | cache[this.openid] = { |
| 132 | uuid: this.session.uuid, |
| 133 | bosId: this.session.bosId, |
| 134 | wid: this.session.wid, |
| 135 | appId: this.session.appId, |
| 136 | cid: this.session.cid, |
| 137 | scope: this.session.scope, |
| 138 | status: this.session.status, |
| 139 | sourceType: this.session.sourceType, |
| 140 | source: this.session.source, |
| 141 | token: this.session.token, |
| 142 | expireTime: this.session.expireTime, |
| 143 | latestExpireTime: this.session.latestExpireTime, |
| 144 | updatedAt: new Date().toISOString(), |
| 145 | }; |
| 146 | writeTokenCache(cache); |
| 147 | } |
| 148 | |
| 149 | removeCachedToken() { |
| 150 | const cache = readTokenCache(); |
no test coverage detected