Estimated reading time: 1 min

How to launch Autochartist from your client portal using SSO

You can launch the Autochartist Web application directly from your on-line portal using a button or a launch link, after the user has authenticated though your login processes. The user simply clicks on the “Launch Autochartist” button or link on your page, to launch the Autochartist Web Application in a new tab, using Single Sign On technology. An encrypted login token ensures secure access.

The following HTTP url query parameters are required and should be sent with every request for authentication:

  • user: unique username or account ID
  • account_type: LIVE or DEMO
  • expire: The Expiry Date for the link (Unix timestamp)
  • logintoken: the generated token (Details below).

The following optional query parameter can be provided to configure the webapp directly via the URL parameters:

  • locale: adjust display language (Options are listed below) Browser language preference will be used if not specified.

Login token Details:

To create a token, you MD5 hash the unique user, the account type, the expiry date, and the secret key.

MD5([username ]|[Account Type]|[Expiry][key])

So for example if you have:

  • User: ExampleUser
  • Account type: for demo use 1, for live use 0. (remember to add ‘&account_type=DEMO’ for demo and ‘&account_type=LIVE’ for live, to the final url)
  • Expiry Date Unix timestamp (on the date this was generated: 1539169943)
  • Set expiry for 3 days:  1539169943 + 3*24*60*60 =  1539429143
  • Key: abc123

You would hash: ExampleUser|0|1539429143abc123 – Which will give you this token:
e3f2d2aec752b7fa6d6961b2ba5f02ea

Use the token to create the SSO link like this:
https://[BrokerName].autochartist.com/aclite/[MainEntryPoint]?username=ExampleUser&account_type=LIVE&expire=1539429143&logintoken=e3f2d2aec752b7fa6d6961b2ba5f02ea

DEMO account example

You would hash: ExampleUser|1abc123 – Which will give you this token:
23bb45bc28687746292ec6b4f72de9d7    
Use the token to create the SSO link like this:
https://[BrokerDNS].autochartist.com/aclite/[MainEntryPoint]?username=ExampleUser&account_type=DEMO&logintoken=23bb45bc28687746292ec6b4f72de9d7

Here is some example code in PHP:
<?php
$expiryDate = time() + (3 * 24 * 60 * 60);
$user_name = “ExampleUser|0|”;
$key = “xxx”;
$token = md5($user_name.$expiryDate.$key);
echo $token;
?>
For demo, you do not need an expiry date
<?php

        $user_name = “ExampleUser|0”;
$key = “xxx”;
$token = md5($user_name.$key);
echo $token;

    ?>

Languages:

To select a language, add: &locale=[language code] to end of the URL
The language codes available are:
Arabic ar_AE     German de_DE       Greek el_GR     English en_GB     Spanish es_ES   Spanish es_US     French fr_FR     French fr_LU      Hebrew he_IL     Hungarian hu_HU Indonesian in_ID     Italian it_IT       Japanese ja_JP     Korean ko_KR
Netherlands nl_NL     Polish pl_PL     Portuguese pt_PT     Russian ru_RU
Swedish sv_SE     Turkish tr_TR     Chinese zh_CN

Was this article helpful?
Dislike 0
Views: 36