Interface TwoFactorAuthStrategy<Account>
Methods
isAuthenticationTokenValid
- isAuthenticationTokenValid(account: Account, authenticationContext: AuthenticationContext, authenticationSessionRepositoryHolder: AuthenticationSessionRepositoryHolder): Promise<boolean>
-
Parameters
-
account: Account
-
-
authenticationSessionRepositoryHolder: AuthenticationSessionRepositoryHolder
Returns Promise<boolean>
Whether token is valid.
onTwoFactorAuthEnabled
- onTwoFactorAuthEnabled(account: Readonly<Account>, update: Partial<Account>): Promise<null | Record<string, any>>
-
Parameters
-
account: Readonly<Account>
-
update: Partial<Account>
Returns Promise<null | Record<string, any>>
Result of the hook.
sendAuthenticationToken
- sendAuthenticationToken(account: Account, authenticationContext: AuthenticationContext, authenticationSessionRepositoryHolder: AuthenticationSessionRepositoryHolder): Promise<void>
-
Parameters
-
account: Account
-
-
authenticationSessionRepositoryHolder: AuthenticationSessionRepositoryHolder
Returns Promise<void>
Represents 2 Factor Authentication strategy.