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

Function identityFromClaims

apps/cloud/src/mcp/jwt.ts:22–29  ·  view source on GitHub ↗
(payload: unknown)

Source from the content-addressed store, hash-verified

20);
21
22const identityFromClaims = (payload: unknown): VerifiedToken | null =>
23 Option.match(parseIdentityClaims(payload), {
24 onNone: () => null,
25 onSome: (claims) => ({
26 accountId: claims.sub,
27 organizationId: claims.org_id ?? null,
28 }),
29 });
30
31export type VerifiedToken = {
32 /** The WorkOS account ID (user ID). */

Callers 2

verifyMcpAccessTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected