MCPcopy Index your code
hub / github.com/TomDoesTech/REST-API-Tutorial / decode

Function decode

src/utils/jwt.utils.ts:10–22  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

8}
9
10export function decode(token: string) {
11 try {
12 const decoded = jwt.verify(token, privateKey);
13
14 return { valid: true, expired: false, decoded };
15 } catch (error) {
16 return {
17 valid: false,
18 expired: error.message === "jwt expired",
19 decoded: null,
20 };
21 }
22}

Callers 2

deserializeUserFunction · 0.90
reIssueAccessTokenFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected