Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/security / / ParsedToken

Type Alias: ParsedToken

ts
type ParsedToken = 
  | {
  checksum: string;
  entropy: string;
  env: string;
  ok: true;
  prefix: string;
  raw: string;
  version: typeof TOKEN_VERSION;
}
  | {
  ok: false;
  reason: TokenFormatError;
};

Defined in: packages/security/src/auth/token-format.ts:80

Result of parseToken(...). Splitting the parsed shape lets the caller branch on the discriminated ok field without exception plumbing on the verify hot path.

Stable