Abstract Class: BaseAuthTOTPRouteSQL
Defined in: src/routes/sql/BaseAuthTOTPRouteSQL.ts:7
Extends
Constructors
Constructor
new BaseAuthTOTPRouteSQL():
BaseAuthTOTPRouteSQL
Returns
BaseAuthTOTPRouteSQL
Inherited from
Properties
aliasClass
protectedaliasClass:any=AliasSQL
Defined in: src/routes/sql/BaseAuthTOTPRouteSQL.ts:8
Overrides
authMiddleware?
protectedoptionalauthMiddleware?:AuthMiddleware
Defined in: src/routes/BaseAuthTOTPRoute.ts:27
Inherited from
BaseAuthTOTPRoute.authMiddleware
jwtConfig?
protectedoptionaljwtConfig?:any
Defined in: src/routes/BaseAuthTOTPRoute.ts:30
Inherited from
messagingUtils?
protectedoptionalmessagingUtils?:MessagingUtils
Defined in: src/routes/BaseAuthTOTPRoute.ts:36
Inherited from
BaseAuthTOTPRoute.messagingUtils
objectFactory?
protectedoptionalobjectFactory?:ObjectFactory
Defined in: src/routes/BaseAuthTOTPRoute.ts:33
Inherited from
BaseAuthTOTPRoute.objectFactory
secretClass
protectedsecretClass:any=SecretSQL
Defined in: src/routes/sql/BaseAuthTOTPRouteSQL.ts:9
Overrides
secretRepo?
protectedoptionalsecretRepo?:RepoUtils<SecretSQL>
Defined in: src/routes/BaseAuthTOTPRoute.ts:38
Inherited from
template
protectedtemplate:string="login-otp"
Defined in: src/routes/BaseAuthTOTPRoute.ts:41
The name of the messaging template to use for sending notifications.
Inherited from
userClass
protecteduserClass:any=UserSQL
Defined in: src/routes/sql/BaseAuthTOTPRouteSQL.ts:10
Overrides
userUtils?
Defined in: src/routes/BaseAuthTOTPRoute.ts:43
Inherited from
Methods
authenticate()
authenticate(
user):Promise<AuthResult|undefined>
Defined in: src/routes/BaseAuthTOTPRoute.ts:92
Authenticates the user using TOTP and returns a JSON Web Token access token to be used with future API requests.
Parameters
user
JWTUser
Returns
Promise<AuthResult | undefined>
Inherited from
BaseAuthTOTPRoute.authenticate
getSecrets()
protectedgetSecrets(uid):Promise<TOTPSecret[]>
Defined in: src/routes/BaseAuthTOTPRoute.ts:100
Parameters
uid
string
Returns
Promise<TOTPSecret[]>
Inherited from
getUser()
protectedgetUser(uid):Promise<JWTUser|undefined>
Defined in: src/routes/BaseAuthTOTPRoute.ts:123
Retrieves the user with the given unique id.
Parameters
uid
string
The unique id of the user to retrieve.
Returns
Promise<JWTUser | undefined>
The user if found, otherwise undefined.
Inherited from
initialize()
protectedinitialize():Promise<void>
Defined in: src/routes/BaseAuthTOTPRoute.ts:49
Called on server startup to initialize the route with any defaults.
Returns
Promise<void>