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

Function jwtPart

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

Source from the content-addressed store, hash-verified

100const validRefreshBody = { access_token: "tok2", token_type: "Bearer", expires_in: 3600 };
101
102const jwtPart = (value: unknown): string =>
103 Buffer.from(JSON.stringify(value)).toString("base64url");
104
105const unsignedJwt = (claims: Record<string, unknown>, alg = "RS256"): string =>
106 `${jwtPart({ alg, typ: "JWT" })}.${jwtPart(claims)}.sig`;

Callers 1

unsignedJwtFunction · 0.70

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected