MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / getTokenExpirationDate

Function getTokenExpirationDate

apps/cli/src/lib/auth/token.ts:53–61  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

51}
52
53export function getTokenExpirationDate(token: string): Date | null {
54 const decoded = decodeToken(token)
55
56 if (!decoded?.exp) {
57 return null
58 }
59
60 return new Date(decoded.exp * 1000)
61}

Callers 1

statusFunction · 0.85

Calls 1

decodeTokenFunction · 0.85

Tested by

no test coverage detected