Previous Next JavaScript must be enabled to correctly display this content

## 3.4 Implementing a custom 2FA mechanism

1. You will need to write your own Java class to implement your own custom factor of authentication.
2. The class must be registered in the table `DIGX_AU_AUTH_TYPE_MST`. Choose a custom ID.
   Description of the illustration security251.png
3. The custom class must implement the interface.

   `com.ofss.digx.framework.security.authentication.provider.I2FactorAuthenticationProvider`

4. To configure your custom authenticator as an additional option available to the admin during the 2FA configuration of transactions, set the custom ID used in Step 2 in the table `DIGX_FW_CONFIG_VAR_B`.
   Description of the illustration security251.png
5. The configuration already seen in the above image suggests that an admin will have the option of setting one of OTP, Soft Token and Security Questions as an additional factor of authentication when configuring 2FA for user segments Retail, Corporate and Administrator.
6. The `PROP_ID` that the system must look up in this table `(DIGX_FW_CONFIG_VAR_B)` is maintained in the table `DIGX_FW_CONFIG_ALL_B` against the `PROP_ID SUPPORTED_AUTH_TYPE`.
7. If `${_PROPERTY_}` is the value maintained against retailuser. `SUPPORTED_AUTH_TYPE` in the table `DIGX_FW_CONFIG_ALL_B`, then for retail users the application will look up the table `DIGX_FW_CONFIG_VAR_B where PROP_ID = _PROPERTY_` to check what options are available to the admin.
   Description of the illustration security261.png

Parent topic: Guidance for Implementation Teams