After having a hard time trying to debug and figuring out why the relying party was rejecting the request (guess I'm not a good programmer) got an idea of implementing a simple SSO solution since all sites share (have access) the same database.
Would like your opinion on the approach:
- Trusted site (relying party in white list) make request (redirect) to main site (provider) with a return url.
- Main site log user (if not logged), mark user as logged in database and add temporary token to user database.
- Main site return (redirect) to RP with token.
- RP look into database using token, logs user and deletes token.
DONE! :)
SSOff also easy: just check on every request into user database into bool record (userLogged). NO REDIRECTS. On logout simply change record (userLogged) to false and every site will know.
Hope there are no security flaws?
Green light? Is it a go?
Thanks a lot,