Application Programming Interface (API)
The software developer implements the login function as a new Web page in their Web application. The following steps show you how to implement the login function.
Step 1: Include the following stylesheet link in the header of the HTML page. This stylesheet will disallow the user from selecting text on your Web page.
Step 3: Create a new form. The URL in the action attribute connects to the Two-way Strong user login function.
Use this URL address to connect to the Test Environment:
Use this URL address to connect to the Live Environment:
Step 4: Add a form label and a form input text field to collect the user's user name.
Step 5: Add a form label and a form input radio button set to collect the user's choice to send a one-time passcode.
Step 6: Add a form submit button to allow the user to submit the form data.
Step 7: Add a form reset button to allow the user to clear the form input fields.
Step 8: Add a form input hidden field to store a value for the length of the client token. The value will tell Two-way Strong how long the one-time passcode should be. Possible values are 5, 6, 7, or 8.
Step 9: Add a form input hidden field to store your API key. Replace INSERT API KEY with your API key.
Step 10: Add a form input hidden field to store the absolute URL of your user login page. On failure, Two-way Strong will return the user to this page that you specify.
Step 11: Add a form input hidden field to store the absolute URL of your token page. On success, Two-way Strong will return the user to this page that you specify.
Step 12: Include helpful instruction about using the form. The following text is recommended.
Download the complete source code.