Single Sign On
📘 Prerequisites
You will need PUBLIC_KEY for SSO.
For Single Sign On (SSO) to work properly when user logins, website needs to encrypt user information with pre-shared PUBLIC_KEY and save that in cookie under main domain.
Artisio Webapp is integrated on the website, just like it is part of the website. That's why it has access on all cookies. Artisio Webapp will read that cookie and pass down to the Artisio servers and users will be authenticated.
What to encrypt?
The customers on which SSO should work must be also pushed to Artisio AMS.
Website must take authenticated customers UUID (Provided by Artisio) and authentication expire date timestamp (in seconds) and encrypt them as JSON.
{"uuid": "63239aab-e74a-4e2d-a149-e99add0cfff0", "expire_date": "2022-10-28 18:18:38 +00:00"}
🚧 Expire Date must be one of the following formats
2022-09-29 02:41:36.123456 +00:002022-09-29 02:41:36.1234562022-09-29 02:41:36 +00:002022-09-29 02:41:36
How to encrypt?
The JSON must be encrypted with pre-shared PUBLIC_KEY. Your Artisio account manager should provide PUBLIC_KEY. Good practice is to set the expire date inside the JSON the same value whatever is set for user's authentication session expire date.
Where to save?
Encrypted string should be saved in root domain's cookie under key artisio_timed_sso (this key will become configurable in the future). Website developer can decide what should be the cookie expiration date.
Tips
The values saved in cookie must be base64 encoded