@ -5,7 +5,7 @@ The purpose of this module is to enable adoption of 2-step authentication withou
# Using this module
The primary entry-point for any use of this module is through the `Factory` class. The Factory accepts configuration via dependency injections on the constructor. The supported workflows are UserManagement and Authenticate
The primary entry-point for any use of this module is through the `Factory` class. The Factory accepts configuration via dependency injections on the constructor. The supported workflows are UserManagement and Authenticate.
## Required
@ -22,7 +22,7 @@ This module needs to accept input from your users. A default implementation exis
The Factory class may return null when you request an `authenticate` workflow, this is to signal that the user doesn't have an authenticator registered to their account and we have nothing to display or respond to.
### The `WorkflowInterface`
Each Workflow implements this interface. It is split into `.view()`/`emit_str()` and `.response()` handlers and requires user data to instantiate.
Each Workflow implements this interface. It is split into `.view()`/`emitStr()` and `.response()` handlers and requires user data to instantiate.
### The `UserManagement` Workflow
This workflow will display an option to the user to enroll in or unenroll from TOTP authentication. Both require the user to successfully answer a TOTP challenge, either corresponding to a new randomly generated key or the key which exists on their account. If the challenge is answered and `.response()` is appropriately called the user will now be enrolled or unenrolled for 2-factor authentication.