MCPcopy Index your code
hub / github.com/anomalyco/opencode / parseJwtClaims

Function parseJwtClaims

packages/opencode/src/plugin/openai/codex.ts:47–55  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

45}
46
47export function parseJwtClaims(token: string): IdTokenClaims | undefined {
48 const parts = token.split(".")
49 if (parts.length !== 3) return undefined
50 try {
51 return JSON.parse(Buffer.from(parts[1], "base64url").toString())
52 } catch {
53 return undefined
54 }
55}
56
57export function extractAccountIdFromClaims(claims: IdTokenClaims): string | undefined {
58 return (

Callers 2

codex.test.tsFile · 0.90
extractAccountIdFunction · 0.85

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected