2022-11-12 00:10:07 +13:00
|
|
|
import { BBContext } from "./koa"
|
|
|
|
|
2022-08-26 06:41:47 +12:00
|
|
|
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
|
|
|
|
}
|
2022-11-12 00:10:07 +13:00
|
|
|
|
|
|
|
export interface PlatformLogoutOpts {
|
|
|
|
ctx: BBContext
|
|
|
|
userId: string
|
2022-11-17 00:34:16 +13:00
|
|
|
keepActiveSession?: boolean
|
2022-11-12 00:10:07 +13:00
|
|
|
}
|