MCPcopy
hub / github.com/Peppermint-Lab/peppermint / checkToken

Function checkToken

apps/api/src/lib/jwt.ts:3–12  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

1import jwt from "jsonwebtoken";
2
3export function checkToken(token: string) {
4 const bearer = token;
5
6 var b64string = process.env.SECRET;
7 var buf = new Buffer(b64string!, "base64"); // Ta-da
8
9 const verified = jwt.verify(bearer, buf);
10
11 return verified;
12}

Callers 3

main.tsFile · 0.90
ticketRoutesFunction · 0.90
authenticateUserFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected