1
0
Fork 0
mirror of synced 2024-05-06 13:32:37 +12:00
budibase/packages/types/src/sdk/auth.ts

36 lines
597 B
TypeScript

import { BBContext } from "./koa"
export interface AuthToken {
userId: string
tenantId: string
sessionId: string
}
export interface CreateSession {
sessionId: string
tenantId: string
csrfToken?: string
}
export interface Session extends CreateSession {
userId: string
lastAccessedAt: string
createdAt: string
// make optional attributes required
csrfToken: string
}
export interface SessionKey {
key: string
}
export interface ScannedSession {
value: Session
}
export interface PlatformLogoutOpts {
ctx: BBContext
userId: string
keepActiveSession?: boolean
}