AstroDBAdapter
Implements
Adapter
Constructors
new AstroDBAdapter()
new AstroDBAdapter(
db
,sessionTable
,userTable
):AstroDBAdapter
Parameters
• db: Database
• sessionTable: SessionTable
• userTable: UserTable
Returns
Defined in
packages/studiocms_auth/src/auth/lucia-astrodb-adapter.ts:13
Methods
deleteExpiredSessions()
deleteExpiredSessions():
Promise
<void
>
Returns
Promise
<void
>
Implementation of
Adapter.deleteExpiredSessions
Defined in
packages/studiocms_auth/src/auth/lucia-astrodb-adapter.ts:76
deleteSession()
deleteSession(
sessionId
):Promise
<void
>
Parameters
• sessionId: string
Returns
Promise
<void
>
Implementation of
Adapter.deleteSession
Defined in
packages/studiocms_auth/src/auth/lucia-astrodb-adapter.ts:19
deleteUserSessions()
deleteUserSessions(
userId
):Promise
<void
>
Parameters
• userId: string
Returns
Promise
<void
>
Implementation of
Adapter.deleteUserSessions
Defined in
packages/studiocms_auth/src/auth/lucia-astrodb-adapter.ts:23
getSessionAndUser()
getSessionAndUser(
sessionId
):Promise
<[null
|DatabaseSession
,null
|DatabaseUser
]>
Parameters
• sessionId: string
Returns
Promise
<[null
| DatabaseSession
, null
| DatabaseUser
]>
Implementation of
Adapter.getSessionAndUser
Defined in
packages/studiocms_auth/src/auth/lucia-astrodb-adapter.ts:27
getUserSessions()
getUserSessions(
userId
):Promise
<DatabaseSession
[]>
Parameters
• userId: string
Returns
Promise
<DatabaseSession
[]>
Implementation of
Adapter.getUserSessions
Defined in
packages/studiocms_auth/src/auth/lucia-astrodb-adapter.ts:43
setSession()
setSession(
session
):Promise
<void
>
Parameters
• session: DatabaseSession
Returns
Promise
<void
>
Implementation of
Adapter.setSession
Defined in
packages/studiocms_auth/src/auth/lucia-astrodb-adapter.ts:54
updateSessionExpiration()
updateSessionExpiration(
sessionId
,expiresAt
):Promise
<void
>
Parameters
• sessionId: string
• expiresAt: Date
Returns
Promise
<void
>
Implementation of
Adapter.updateSessionExpiration
Defined in
packages/studiocms_auth/src/auth/lucia-astrodb-adapter.ts:66