Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. # Single sign-on implementation
  2.  
  3. ### User comes to the User portal
  4.  
  5. 1. There is no token for API (website can't interact with API server)
  6. 2. User is redirected to Account portal to specify credentions in login form.
  7. Request contains ?returnURL=my.molecular-life.com/#/dashboard
  8. 3. Account portal makes request to the API server to generate token for the user
  9. 4. Account portal redirects user to the URL which was specified in returnURL.
  10. 5. User portal saves token and uses it with all following interaction with API server.
  11. ____________________________
  12. |____________________________|
  13. | |
  14. | |
  15. (1) | USER PORTAL |
  16. | |
  17. |____________________________|
  18. | USER PORTAL COOKIE STORAGE |
  19. | (5) token=DF798ASDGDDS7... |
  20. |____________________________|
  21.  
  22. || /\
  23. (2) || || (4)
  24. || ||
  25. \/ ||
  26. ____________________________
  27. |____________________________|
  28. | |
  29. | |
  30. | ACCOUNT PORTAL |
  31. | |
  32. |____________________________|
  33. | ACCOUNT COOKIE STORAGE |
  34. | (3) token=DF798ASDGDDS7... |
  35. |____________________________|
  36.  
  37. ### User comes to the Shop portal
  38.  
  39. 1. There is no token for API (website can't interact with API server)
  40. 2. User is redirected to Account portal to specify credentions in login form.
  41. Request contains ?returnURL=shop.molecular-life.com/#/
  42. 3. Account portal already has the token (it was generated by previous interaction with User portal),
  43. so user is redirected to the URL which was specified in returnURL without any communication with API server.
  44. 4. Shop portal saves token and uses it with all following interaction with API server.
  45. ____________________________
  46. |____________________________|
  47. | |
  48. | |
  49. (1) | SHOP PORTAL |
  50. | |
  51. |____________________________|
  52. | SHOP PORTAL COOKIE STORAGE |
  53. | (4) token=DF798ASDGDDS7... |
  54. |____________________________|
  55.  
  56. || /\
  57. (2) || || (3)
  58. || ||
  59. \/ ||
  60. ____________________________
  61. |____________________________|
  62. | |
  63. | |
  64. | ACCOUNT PORTAL |
  65. | |
  66. |____________________________|
  67. | ACCOUNT COOKIE STORAGE |
  68. | token=DF798ASDGDDS7... |
  69. |____________________________|
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement