(token: string)
| 72 | * JWTs from opaque API keys without attempting signature verification. |
| 73 | */ |
| 74 | export 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 |
no outgoing calls
no test coverage detected