My problem is simple.
I have a service oriented architecture where one of the servers is an auth server.
Users are authenticating with HTTPS in this server and then go to other servers with a token to get services.
My solution idea was this:
The auth server will generate two cookies, one with the actual data of the user (user GUID / session expiration date and privileges)
And another cookie with an encrypted token that includes the actual data (with some salt) encrypted with a private key.
Each server in the system will be able to make sure that the user is how it claims to be with the two cookies and the public key.
I need an example for such a code (or maybe a better solution if I missed anything)
I don’t think you need to reinvent the wheel, you could simply use CAS for this single sign on functionaliy.