Single Sign-On
Single Sign-on (SSO) occurs when a user logs in to one application and is then signed in to other applications automatically, regardless of the platform, technology, or domain the user is using. The user signs in only one time, hence the name of the feature (Single Sign-on).
For example, if you log in to a Google service such as Gmail, you are automatically authenticated to YouTube, Google Drive, Google Analytics, and other Google apps. Likewise, if you log out of your Gmail or other Google apps, you are automatically logged out of all the apps; this is known as Single Logout.
How it works with Epixel MLM Software
For the implementation of SSO service, the services connected to our system are considered as two types of services. ie; host and client services.
The service in which the user logs directly is called host service and the services which are logged from this host service is called the client service.
Workflow:-
Login
user logs in to a service by using login credentials (host).
an API session-id is created in the host service.
when the user requests another service, a request is sent to the particular login endpoint of the requested service with a single time token.
then using the received single time token and an apikey a request is sent to the host service to validate the request. after validating the request an API session-id and an access token are returned.
in the client service using the access token user is authenticated. and an acknowledgment is sent to the host service. Logout
Logout
if a user requests log out from any of the services it will automatically log out the user from all services.
Log out from the host service
a request with API session-id is sent to the logout end point of all the services which are logged in using the host service.
then the client service will destroy the session related to the API session-id.
Log out from the client service
The API session id is passed to the host service.
then the host service will destroy all the sessions related to the API session-id.
Single Sign-On Service Request
PUT
‎https://<domain>/<sso prefix>/<version>/service-request/
This endpoint will return a unique login URL of the requested service. Normally this is an in-site ajax request.
Request Body
Error Responses
Single Sign-On External Service Request
POST
‎‎‎‎‎‎‎‎https://<domain>/<api prefix>/<version>/sso/service-request/
Requesting unique login url for another service from host service This API endpoint will return unique login url for the requested service
Headers
Request Body
Sample code
Node
PHP
Error Responses
Single Sign-On URL Token Verify
POST
‎‎https://<domain>/<api prefix>/<version>/sso/token-verify/
This endpoint will return an API session-id and an access token.
Headers
Request Body
Sample code
Node
PHP
Error Responses
Single Sign-On Login Acknowledgment
POST
‎‎‎‎‎‎‎‎‎https://<domain>/<api prefix>/<version>/sso/login-acknowledgement/
This endpoint will acknowledge the host service.
Path Parameters
Request Body
Sample code
Node
PHP
Error Responses
Single Sign-On User Logout
POST
‎‎https://<domain>/<api prefix>/<version>/sso/logout/
This API endpoint will destroy all sessions based on the api_sid.
Headers
Request Body
Sample code
Node
PHP
Error Responses
Last updated