MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / looksLikeJWT

Function looksLikeJWT

server/src/auth/workos-jwt.ts:74–78  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

72 * JWTs from opaque API keys without attempting signature verification.
73 */
74export function looksLikeJWT(token: string): boolean {
75 const parts = token.split('.');
76 if (parts.length !== 3) return false;
77 return parts.every((p) => p.length > 0 && /^[A-Za-z0-9_-]+$/.test(p));
78}
79
80/**
81 * Verify a WorkOS-signed JWT. Throws on any verification failure

Callers 2

validateWorkOSBearerJWTFunction · 0.85
workos-jwt.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected