Abstract Class: BaseAuthMFARouteSQL
Defined in: src/routes/sql/BaseAuthMFARouteSQL.ts:7
Extends
Constructors
Constructor
new BaseAuthMFARouteSQL():
BaseAuthMFARouteSQL
Returns
BaseAuthMFARouteSQL
Inherited from
Properties
aliasClass
protectedaliasClass:any=AliasSQL
Defined in: src/routes/sql/BaseAuthMFARouteSQL.ts:8
Overrides
aliasRepo?
protectedoptionalaliasRepo?:RepoUtils<AliasSQL>
Defined in: src/routes/BaseAuthMFARoute.ts:27
Inherited from
authMiddleware?
protectedoptionalauthMiddleware?:AuthMiddleware
Defined in: src/routes/BaseAuthMFARoute.ts:30
Inherited from
BaseAuthMFARoute.authMiddleware
jwtConfig?
protectedoptionaljwtConfig?:any
Defined in: src/routes/BaseAuthMFARoute.ts:33
Inherited from
messagingUtils?
protectedoptionalmessagingUtils?:MessagingUtils
Defined in: src/routes/BaseAuthMFARoute.ts:39
Inherited from
BaseAuthMFARoute.messagingUtils
objectFactory?
protectedoptionalobjectFactory?:ObjectFactory
Defined in: src/routes/BaseAuthMFARoute.ts:36
Inherited from
BaseAuthMFARoute.objectFactory
secretClass
protectedsecretClass:any=SecretSQL
Defined in: src/routes/sql/BaseAuthMFARouteSQL.ts:9
Overrides
secretRepo?
protectedoptionalsecretRepo?:RepoUtils<SecretSQL>
Defined in: src/routes/BaseAuthMFARoute.ts:41
Inherited from
template
protectedtemplate:string="login-otp"
Defined in: src/routes/BaseAuthMFARoute.ts:44
The name of the messaging template to use for sending notifications.
Inherited from
userClass
protecteduserClass:any=UserSQL
Defined in: src/routes/sql/BaseAuthMFARouteSQL.ts:10
Overrides
userRepo?
protectedoptionaluserRepo?:RepoUtils<UserSQL>
Defined in: src/routes/BaseAuthMFARoute.ts:46
Inherited from
userUtils?
Defined in: src/routes/BaseAuthMFARoute.ts:48
Inherited from
Methods
authenticate()
authenticate(
user):Promise<AuthResult|undefined>
Defined in: src/routes/BaseAuthMFARoute.ts:114
Authenticates the user using HTTP MFA and returns a JSON Web Token access token to be used with future API requests.
Parameters
user
JWTUser
Returns
Promise<AuthResult | undefined>
Inherited from
convertAliasToMethod()
protectedconvertAliasToMethod(alias,obfuscate?):MFAMethod|undefined
Defined in: src/routes/BaseAuthMFARoute.ts:122
Parameters
alias
obfuscate?
boolean
Returns
MFAMethod | undefined
Inherited from
BaseAuthMFARoute.convertAliasToMethod
convertSecretToMethod()
protectedconvertSecretToMethod(secret):MFAMethod|undefined
Defined in: src/routes/BaseAuthMFARoute.ts:149
Parameters
secret
Returns
MFAMethod | undefined
Inherited from
BaseAuthMFARoute.convertSecretToMethod
getMethod()
protectedgetMethod(id):Promise<MFAMethod|undefined>
Defined in: src/routes/BaseAuthMFARoute.ts:172
Retrieves the user's secondary authentication method for a given id.
Parameters
id
string
The unique id of the secondary auth method to retrieve.
Returns
Promise<MFAMethod | undefined>
Inherited from
getMethods()
protectedgetMethods(uid):Promise<MFAMethod[]>
Defined in: src/routes/BaseAuthMFARoute.ts:202
Retrieves the list of secondary authentication methods for the user with the given id. This list is sent to the user and so should be obfuscated where reasonable so as to limit discovery when a password has been compromised.
Parameters
uid
string
The unique identifier of the user.
Returns
Promise<MFAMethod[]>
Inherited from
getUser()
protectedgetUser(uid):Promise<JWTUser|undefined>
Defined in: src/routes/BaseAuthMFARoute.ts:252
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/BaseAuthMFARoute.ts:54
Called on server startup to initialize the route with any defaults.
Returns
Promise<void>
Inherited from
notifyContact()
protectednotifyContact(contact,totp):Promise<void>
Defined in: src/routes/BaseAuthMFARoute.ts:259
Parameters
contact
totp
string
Returns
Promise<void>
Inherited from
BaseAuthMFARoute.notifyContact
obfuscateAlias()
protectedobfuscateAlias(alias,type):string
Defined in: src/routes/BaseAuthMFARoute.ts:286
Obfuscates the given alias and returns the obfuscated value.
Parameters
alias
string
type
Returns
string
Inherited from
BaseAuthMFARoute.obfuscateAlias
verify()
protectedverify(name,password):Promise<JWTUser|undefined>
Defined in: src/routes/BaseAuthMFARoute.ts:304
Parameters
name
string
password
string
Returns
Promise<JWTUser | undefined>