MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / classifyToken

Function classifyToken

packages/oauth/src/token-state.ts:28–34  ·  view source on GitHub ↗
(token: TokenInfo | undefined)

Source from the content-addressed store, hash-verified

26 | { readonly kind: 'missing' };
27
28export function classifyToken(token: TokenInfo | undefined): TokenState {
29 if (token === undefined) return { kind: 'missing' };
30 if (token.accessToken.length === 0) {
31 return { kind: 'revoked', scope: token.scope, tokenType: token.tokenType };
32 }
33 return { kind: 'valid', token };
34}
35
36export function revokedTombstone(prior: TokenInfo): TokenInfo {
37 return {

Callers 1

loadStateMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected