1. Passing user's information
The first step is to pass required information to UserRules. These all params need to be passed in URL.
| field | type | required? | default | options | description |
|---|---|---|---|---|---|
uid |
String | yes | A unique identifier for the user (ex: the user_id in your system). | ||
un |
String | yes | User Display Name | ||
uem |
String | yes | User Email, required for user to be updated on his feedbacks | ||
uimg |
String | User Image Url, This will be used to show images from your systems | |||
sso |
String | yes | true | Always pass value true. | |
companyShortName |
String | yes | Your company's short name registered with UserRules. |
2. Create a Signature
Next, we'll need a way to ensure that you sent this request. It will need another parameter sign which you can generate using your API Key (you can get your API Key from My Company -> Settings -> Advanced Settings).
- Create a string like this
"uid=" + uid + "&un=" + un + "&uem=" + uemail + "&uimg=" + uimg - You will create a Hmac-SHA1 hash based signature for this string.
- Base64 encode the encrypted output to generate the token.
Base64 Encode
The next step is to append the signature to UserRules using a sign request parameter. sign has to be last request parameter in order for it to work.
3. Sample SSO Request
We have created a live demo sample request which will show how your request should look like in the end.
Need Help?
If you need help, please contact support.