DatabaseInterface <CustomUser>
Hierarchy
- DatabaseInterfaceSessions
- DatabaseInterfaceUser<CustomUser>
- DatabaseInterface
Index
Methods
- addEmail
- addEmailVerificationToken
- addLoginToken
- addResetPasswordToken
- createSession
- createUser
- findPasswordHash
- findSessionById
- findSessionByToken
- findUserByEmail
- findUserByEmailVerificationToken
- findUserById
- findUserByLoginToken
- findUserByResetPasswordToken
- findUserByServiceId
- findUserByUsername
- invalidateAllSessions
- invalidateSession
- removeAllLoginTokens
- removeAllResetPasswordTokens
- removeEmail
- setPassword
- setService
- setUserDeactivated
- setUsername
- unsetService
- updateSession
- verifyEmail
Methods
addEmail
Parameters
userId: string
newEmail: string
verified: boolean
Returns Promise<void>
addEmailVerificationToken
Parameters
userId: string
email: string
token: string
Returns Promise<void>
addLoginToken
Parameters
userId: string
email: string
token: string
Returns Promise<void>
addResetPasswordToken
Parameters
userId: string
email: string
token: string
reason: string
Returns Promise<void>
createSession
Parameters
userId: string
token: string
connection: ConnectionInformations
optionalextraData: object
Returns Promise<string>
createUser
Parameters
Returns Promise<string>
findPasswordHash
Parameters
userId: string
Returns Promise<null | string>
findSessionById
Parameters
sessionId: string
Returns Promise<null | Session>
findSessionByToken
Parameters
token: string
Returns Promise<null | Session>
findUserByEmail
Parameters
email: string
Returns Promise<null | CustomUser>
findUserByEmailVerificationToken
Parameters
token: string
Returns Promise<null | CustomUser>
findUserById
Parameters
userId: string
Returns Promise<null | CustomUser>
findUserByLoginToken
Parameters
token: string
Returns Promise<null | CustomUser>
findUserByResetPasswordToken
Parameters
token: string
Returns Promise<null | CustomUser>
findUserByServiceId
Parameters
serviceName: string
serviceId: string
Returns Promise<null | CustomUser>
findUserByUsername
Parameters
username: string
Returns Promise<null | CustomUser>
invalidateAllSessions
Parameters
userId: string
optionalexcludedSessionIds: string[]
Returns Promise<void>
invalidateSession
Parameters
sessionId: string
Returns Promise<void>
removeAllLoginTokens
Parameters
userId: string
Returns Promise<void>
removeAllResetPasswordTokens
Parameters
userId: string
Returns Promise<void>
removeEmail
Parameters
userId: string
email: string
Returns Promise<void>
setPassword
Parameters
userId: string
newPassword: string
Returns Promise<void>
setService
Parameters
userId: string
serviceName: string
data: object
Returns Promise<void>
setUserDeactivated
Parameters
userId: string
deactivated: boolean
Returns Promise<void>
setUsername
Parameters
userId: string
newUsername: string
Returns Promise<void>
unsetService
Parameters
userId: string
serviceName: string
Returns Promise<void>
updateSession
Parameters
sessionId: string
connection: ConnectionInformations
optionalnewToken: string
Returns Promise<void>
verifyEmail
Parameters
userId: string
email: string
Returns Promise<void>