PHP code to generate tokens for SSO custom Authentication in Helical Insight

Hello Helical Insight,
I am using helical insight 4.1 GA. I am trying to implement SSO (external token-based authentication ) and the blog I am following is
https://www.helicalinsight.com/implementing-single-sign-sso-helical-insight-application/
I see that there is already sample java code as well as description of the algorithm to be followed mentioned in the blog. My frontend application is in PHP. Would you have sample code for PHP also?

Thank You,
Vema

Hello Vema,

Single sign-on (SSO) is an authentication process that allows a user to access multiple applications with one set of login credentials.

This guide helps you to implement the single sign-on (SSO) using custom token-based authentication, this will results in a user being able to log in to Helical Insight application based on a shared login mechanism and ID.

If you have an application or portal you want to use with Helical Insight application having no single sign-on environment, you can use the Helical Insight token-based authentication and user management framework. To work with token-based authentication, your application or portal must do the following:

Authenticate the end user according to the standards of your environment or application.

Encrypt a token based on authenticated user values within your application or process. The token values can include username, organization (if multi-tenancy is enabled), roles, and profile attributes. You can configure the token based on your needs for reporting and analysis within the Helical Insight application.

Send the token to the Helical Insight as a part of the HTTP request.

When Helical Insight Receives the token, it will:

Attempt to decrypt the token (if encrypted) and validate the token format

If the token is successfully parsed, use the information in the token to create and update the external user within Helical Insight application.

We are attachig the php code to generate tokens from the parent application.

Please download the SSO_PHP.zip (2.1 KB)

Thank You,
Helical Insight.