MCPcopy Index your code
hub / github.com/ether/etherpad / destroy

Method destroy

src/node/security/OIDCAdapter.ts:35–54  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

33 }
34
35 destroy(id: string) {
36 const key = this.key(id);
37 const found = storage.get(key) as AdapterPayload | undefined;
38 const grantId = found?.grantId;
39
40 if (found?.userCode) {
41 storage.delete(userCodeKeyFor(found.userCode));
42 }
43
44 storage.delete(key);
45
46 if (grantId) {
47 const grantKey = grantKeyFor(grantId);
48 const tokens = storage.get(grantKey) as string[] | undefined;
49 tokens?.forEach(token => storage.delete(token));
50 storage.delete(grantKey);
51 }
52
53 return Promise.resolve();
54 }
55
56 consume(id: string) {
57 const key = this.key(id);

Callers 3

pad_editor.tsFile · 0.80
OIDCAdapter.tsFile · 0.80
closeServerFunction · 0.80

Calls 5

keyMethod · 0.95
userCodeKeyForFunction · 0.85
grantKeyForFunction · 0.85
getMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected