1
0
Fork 0
mirror of synced 2024-05-19 11:53:53 +12:00
budibase/packages/types/src/sdk/auth.ts

36 lines
597 B
TypeScript
Raw Normal View History

import { BBContext } from "./koa"
export interface AuthToken {
userId: string
tenantId: string
sessionId: string
}
2022-09-06 23:25:57 +12:00
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
}