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

Function verifyWorkosUserManagementToken

apps/cloud/src/mcp/jwt.ts:147–155  ·  view source on GitHub ↗
(token: string, jwks: JWTVerifyGetKey)

Source from the content-addressed store, hash-verified

145// and live org-membership is re-checked downstream. Signature + expiry are
146// enforced by jose.
147export const verifyWorkosUserManagementToken = (token: string, jwks: JWTVerifyGetKey) =>
148 Effect.gen(function* () {
149 const { payload } = yield* Effect.tryPromise({
150 try: () => jwtVerify(token, jwks, workosAccessTokenOptions),
151 catch: classifyJwtVerificationError,
152 }).pipe(withJwtVerificationSpan);
153
154 return identityFromClaims(payload);
155 });

Callers 2

resolveJwtPrincipalFunction · 0.90

Calls 1

identityFromClaimsFunction · 0.85

Tested by

no test coverage detected