javascript - How to verify identity on server when using an external login -


i have explain scenario here: want single authentication authority our webapps. sit on server a (for auth). 1 holds user's emails, passwords, etc. stuff should not shared.

then have server b, on app hosted. able write javascript authentication , login part, works this:

b loads login dialog code user logs dialog has session (cookie) user b asks javascript of user details 

in browser, b can logged in user a because server code of a has access session, ajax call works , can confident deliver.

now, app on b needs load privileged data own database, should visible right user. far, browser has knowledge if user logged in @ all, , is.

so sending user id via ajax server of b ludicrously unsafe , faked. since session, cookie , user data ever known a, b needs have way verify if access privileged data legit.

and there i'm bit stumped in how can design api on a support server-to-server verification ensure b can check it's right user , has right access data.

maybe it's trivial solution, open input.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -