Two-way Strong ¦ Sign In ¦ New User

Application Programming Interface (API)

 

Introduction

User Account

API Key

Test Environment

Web Application

Login

Token

Session Check

Session Check (Static)

Logout

Logout (Static)

Mobile Application

Mobile Login Check

Key Data Fields

Response Messages

Demo Examples

Powered By (Credit)

Technical Support

 

Token Function

The software developer implements the token function as a new Web page in their Web application. The following steps show you how to implement the token 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.

<link rel="stylesheet" href="https://www.2waystrong.com/assets/css/TwowayBrowserControlV01.css" type="text/css" />

Step 2: Include the following JavaScript function in the header of the HTML page. This function will disable the user from viewing your source code.

<script>
        window.oncontextmenu = function () {
            return false;
        };
</script>

Step 3: Create a new form. The URL in the action attribute connects to the Two-way Strong token function.

<form method="post" action="https://www.2waystrong.com/ApiUsr/TokenV01Live"></form>

Use this URL address to connect to the Test Environment:

https://www.2waystrong.com/ApiUsr/TokenV01Test

Use this URL address to connect to the Live Environment:

https://www.2waystrong.com/ApiUsr/TokenV01Live

Step 4: Add a form label and a form input text field to collect the user's user name.

<p>User Name</p>
<input type="text" name="userID" value="" size="30" maxlength="15" title="User Name" placeholder="" tabindex="1" required />

Step 5: Add a form label and a form input text field to collect the user's one-time passcode.

<p>One-time Passcode</p>
<p><input type="text" name="tokenInput" value="" size="30" maxlength="8" title="One-time Passcode" placeholder="" tabindex="2" required /></p>

Step 6: Add a form submit button to allow the user to submit the form data.

<input type="submit" name="submit" value="SIGN IN" tabindex="3" />

Step 7: Add a form reset button to allow the user to clear the form input fields.

<input type="reset" value="CLEAR" tabindex="4" />

Step 8: Add a form input hidden field to store your API key. Replace INSERT API KEY with your API key.

<input type="hidden" name="apiKey" value="INSERT API KEY" />

Step 9: Add a form input hidden field to store the absolute URL of your token page. On failure, Two-way Strong will return the user to this page that you specify.

<input type="hidden" name="returnTokenPath" value="INSERT TOKEN URL" />

Step 10: Add a form input hidden field to store the absolute URL of your secured Web page. On success, Two-way Strong will return the user to this page that you specify.

<input type="hidden" name="returnDestPath" value="INSERT SECURED WEB PAGE URL" />

Step 11: Include helpful instruction about using the form. The following text is recommended.

<p>Check your phone or e-mail for the one-time passcode. If it wasn't received, create a new one-time passcode <a href="login.html">here</a>.</p>

Download the complete source code.