Skip to content

Type Alias: OcTokenCheck

TypeScript
type OcTokenCheck = 
  | {
  session: SessionPayload;
  status: "valid";
}
  | {
  status: "invalid";
}
  | {
  status: "unavailable";
};

Defined in: index.ts:836 (opens in a new tab)

A token's verification, telling a bad token from a key set that can't be read: unavailable when the issuer's JWKS can't be fetched and no copy younger than jwksMaxStaleMs is held. That is an outage, not a refusal: answer it 503 so the client tries again, never as "signed out".