Marketing4WiFi Single Sign-On Developer Guide
Marketing4WiFi Single Sign-on allows trusted applications and third parties to authenticate Client Users into the M4W platform automatically, without the user having to re-authenticate.
Single Sign-on Workflow
Here’s how the process works.
1. The application requests an Auth URL by sending client’s username to the API Endpoint along with the Operator Marketing4WiFi API_TOKEN.
Request URL :
https://api.smartwifiplatform.com/v2/auth/logon?api_token=<API_TOKEN>&username=<CLIENT_USERNAME>
2. If the <API_TOKEN> and <CLIENT_USERNAME> matches, the M4W API Endpoint will return an Auto Auth URL to the application.
Response :
{ "status": 200, "url": "https://<OPERATOR_DASHBOARD_HOST>/process/processLogin.php?username=<CLIENT_USERNAME>×tamp=<TIMESTAMP>&hash=<SERVER_GENERATED_HASH>" }
3. The application then redirects the user to the Auto Auth URL using their configured dashboard hostname. (url from the above JSON).
4. The user is authenticated and redirected to the Dashboard.