MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / jwtPart

Function jwtPart

packages/core/sdk/src/oauth-helpers.test.ts:92–93  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

90const validRefreshBody = { access_token: "tok2", token_type: "Bearer", expires_in: 3600 };
91
92const jwtPart = (value: unknown): string =>
93 Buffer.from(JSON.stringify(value)).toString("base64url");
94
95const unsignedJwt = (claims: Record<string, unknown>, alg = "RS256"): string =>
96 `${jwtPart({ alg, typ: "JWT" })}.${jwtPart(claims)}.sig`;

Callers 1

unsignedJwtFunction · 0.70

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected