Jetlun REST Web Service Interface

Authentication

For Security Credentials, JEDI REST API services use public key cryptography technology with every JEDI REST API request. In public key cryptography each user or the device taking part in the communication have a pair of keys, a public key and a secret code, and a set of operations associated with the keys to do the cryptographic operations. Only the particular user/device knows the secret code whereas the public key is distributed to all users/devices taking part in the communication.

The primary benefit of public key cryptography is that it allows people who have no preexisting security arrangement to exchange messages securely. The need for sender and receiver to share secret keys via some secure channel is eliminated; all communications involve only public keys, and no private key is ever transmitted or shared.

This section describes how to use public key cryptography to create a signature for JEDI REST API request.

First, every request must have myjetlun_id argument, you can find your myjetlun-id on your profile page in myjetlun.com. Then you must obtain an API key and a Secret code from myJetlun api site.

In our example, our API key is 123456, our Secret code is 9a0554259914a86.

To generate a signature, we take our Secret code to prepend it to api_key and timestamp string. In this example, our timestamp are: timestamp=20120110090000, api_key=123456, so our signature string will be:

“9a0554259914a86api_key123456timestamp20120110090000”.

We then take the MD5 sum of this string and use it as our signature. It should be added as a named argument called 'sign'.

Single Sign On

This section describes how to request an Single Sign On by a login link.

First, you need obtain an api key here,You can get the shared Secret after you finished sign up. Now we can create a login link.

To generate a login link, you should construct the url as follows.

http://myjetlun.com/access/remote/?myjetlunid=[myJetlunid]&api_key=[api_key]&sign=[sign]&timestamp=[timestamp]

[myJetlunid] is the account you need login which you can obtain from myjetlun portal profile page.

[sign] is a signature of the other three parameters. Signatures are created using your myJetlunid, secret, api_key, and timestamp. In our example, our API key is 123456, our shared secret is 9a0554259914a86, our myJetlunid is 4e7164c569eccc2d8 and timestamp is 20120110090000.

so our signature string will be:

“4e7164c569eccc2d89a0554259914a86api_key123456timestamp20120110090000”.

We then take the MD5 sum of this string and use it as our signature. It should be added as a named argument called 'sign'.
We can then build our full login URL:

http://myjetlun.com/access/remote/?myjetlunid=4e7164c569eccc2d8&api_key=123456&sign=83f3578f051ae0b91da3977dc3f3fc0c&timestamp=20120110090000