SSO Authentication
Introduction¶
The vendor API is an innovative solution provided by Jainam Securities APIs. Vendor APIs are usually used by technical companies to build innovative technical solutions and customised trading platforms to retail traders. Vendor API will enable vendors to create the Session for any user, who has authorized the app registered by Vendor. This way, the vendors do not have to manually get the API Key from users to generate session.
Base URL
The Base URL is the common URL used as a prefix for all API calls.
Vendor API¶
Registration as a Vendor:¶
-
To register as a Vendor, Please visit https://protrade.jainam.in/developers
-
Login using your Jainam credentials.
- In the Apps sections, Create a new application.
- Fill out the mandatory details.
- Click "Save" to create a new app.
- An App Code (appCode) and API Secret (apiSecret) will be provided to the Vendor. This code is important and Confidential. DO NOT Share with anyone outside your organization.
Implementation of SSO:
- During User login, the Vendor should redirect the Jainam user to
https://protrade.jainam.in/?appcode={appcode} along with the App Code as shown here in the url. - User will be asked to login with their Jainam credentials.
- After sucessful login, the user will be redirected to the URL provided by the Vendor (Provisions to provide / update the Redirect URL is provided in the Developers Login) along with User Authorization token (authCode) and User ID (userId).
- The Vendor will save the user authCode, UserId (userId) along with apiSecret to create a checkSum, which is the SHA-256 hash of userId + authCode + apiSecret
- Vendor should send this checkSum to the URL : https://protrade.jainam.in/omt/auth/sso/vendor/getUserDetails to get the User Session (userSession), which can be used to access all API end points.