MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / saveCachedToken

Method saveCachedToken

wxapp/hrj.js:128–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 2

runMethod · 0.95
loginByWxCodeMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected