I am doing something in PHP where I have to read session values for another session instance. example
Browser1: $_SESSION['value']="user1";
Browser2: $_SESSION['value']="user2";
Browser1 will need to get "user2" value from certain request. The request will also include cookie(key, value).
How can I do that?
Thanks, Wa'el
1 PHP server that handles SSO(single sign on) the other is a web applicarion runs on ruby on rails(ROR)
[...]
but we need to implement new functionality where the ROR server needs to submit an authentication request at the SSO on behalf of the browser
Your SSO model doesn't need to work that way. In fact, it shouldn't.
SSO usually works like this. I'm using non-standard names because I'm tired and don't remember what their official names are:
At no point does the Page Server "impersonate" the End User, and at no point do the Page Server or the Authentication Server need to touch each other's End User session data.
At no point does the Page Server get a copy of the user's credentials. Actual authentication of the End User only happens on the Authentication Server. The Page Server requests data about the user after the Authentication Server bounces the user back with the proper request token.
You can make this process more complex, if you'd like. For example, the URL that the Authentication Server bounces the user back to might need to be customizable. You can include the return URL with the End User request to the Authentication Server, but if you do so, you should sign it (using, say, HMAC) to ensure that some malicious cretin doesn't manipulate it on the way.
Clear as mud?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With