Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat do I need to properly implement a single sign-on with a legacy authentication rest API?
    primarykey
    data
    text
    <p><strong>overview</strong><br> I have a legacy php system that is used for user management and authentication. It has a restful api to authenticate users. I say legacy because I do not believe the API adheres to modern standards and does not have proper documentation. From the documentation left</p> <blockquote> <p>...It (the API) can issues cookies, etc. Fields username, context, and password are required. setcookies is not required. The default value is TRUE, that is if setcookies is not explicitly set to false than cookies will be set.</p> <p>Response: HTTP 200 on success, 404 on failure.</p> <p>Example request:</p> <pre><code> &lt;logins&gt; &lt;login&gt; &lt;username&gt;[username/email]&lt;/username&gt; &lt;context&gt;[context]&lt;/context&gt; &lt;password&gt;[password, unhashed]&lt;/password&gt; &lt;setcookies&gt;[TRUE / FALSE]&lt;/setcookies&gt; &lt;/login&gt; &lt;/logins&gt; </code></pre> </blockquote> <p><strong>What I need:</strong> I have a few sites, site A and site B that live under the same top level domain. I need to be able to automatically logs users in site B when they login Site A and log users out in a similar manner.</p> <p><strong>Details</strong><br> At the moment, Site A works with the legacy API to sign the users in and it does it successfully. However, I am unable to detect that on Site B. My questions are</p> <ol> <li>What would should I be looking for in ideal situation? Perhaps a shared authentication cookie that should be shared?</li> <li>What data should the authentication cookie contain? </li> <li>And lastly how do I check if the user logged out on site B? should the cookie values change or I have make frequent service calls to verify the user is still logged in or logged out?</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload