better-buddy-share-backend
Preparing search index...
dao/db/interfaces/auth/ISessionDAO
ISessionDAO
Interface ISessionDAO
interface
ISessionDAO
{
cleanupExpiredSessionsAndTokens
()
:
Promise
<
boolean
>
;
createSession
(
userId
:
number
,
expiresAt
:
Date
,
ipAddress
?:
string
|
null
,
userAgent
?:
string
|
null
,
deviceInfo
?:
string
|
null
,
)
:
Promise
<
Session
|
null
>
;
extendSession
(
sessionId
:
string
,
new_expires_at
:
Date
,
)
:
Promise
<
Session
|
null
>
;
getActiveSessions
(
userId
:
number
)
:
Promise
<
Session
[]
>
;
revokeAllUserSessions
(
userId
:
number
)
:
Promise
<
boolean
>
;
revokeSession
(
sessionId
:
string
)
:
Promise
<
boolean
>
;
touchSessionLastUsed
(
sessionId
:
string
)
:
Promise
<
Session
|
null
>
;
}
Implemented by
SessionDAO
Index
Methods
cleanup
Expired
Sessions
And
Tokens
create
Session
extend
Session
get
Active
Sessions
revoke
All
User
Sessions
revoke
Session
touch
Session
Last
Used
Methods
cleanup
Expired
Sessions
And
Tokens
cleanupExpiredSessionsAndTokens
()
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
create
Session
createSession
(
userId
:
number
,
expiresAt
:
Date
,
ipAddress
?:
string
|
null
,
userAgent
?:
string
|
null
,
deviceInfo
?:
string
|
null
,
)
:
Promise
<
Session
|
null
>
Parameters
userId
:
number
expiresAt
:
Date
Optional
ipAddress
:
string
|
null
Optional
userAgent
:
string
|
null
Optional
deviceInfo
:
string
|
null
Returns
Promise
<
Session
|
null
>
extend
Session
extendSession
(
sessionId
:
string
,
new_expires_at
:
Date
)
:
Promise
<
Session
|
null
>
Parameters
sessionId
:
string
new_expires_at
:
Date
Returns
Promise
<
Session
|
null
>
get
Active
Sessions
getActiveSessions
(
userId
:
number
)
:
Promise
<
Session
[]
>
Parameters
userId
:
number
Returns
Promise
<
Session
[]
>
revoke
All
User
Sessions
revokeAllUserSessions
(
userId
:
number
)
:
Promise
<
boolean
>
Parameters
userId
:
number
Returns
Promise
<
boolean
>
revoke
Session
revokeSession
(
sessionId
:
string
)
:
Promise
<
boolean
>
Parameters
sessionId
:
string
Returns
Promise
<
boolean
>
touch
Session
Last
Used
touchSessionLastUsed
(
sessionId
:
string
)
:
Promise
<
Session
|
null
>
Parameters
sessionId
:
string
Returns
Promise
<
Session
|
null
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
cleanup
Expired
Sessions
And
Tokens
create
Session
extend
Session
get
Active
Sessions
revoke
All
User
Sessions
revoke
Session
touch
Session
Last
Used
better-buddy-share-backend
Loading...