Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Single sign-on implementation
- ### User comes to the User portal
- 1. There is no token for API (website can't interact with API server)
- 2. User is redirected to Account portal to specify credentions in login form.
- Request contains ?returnURL=my.molecular-life.com/#/dashboard
- 3. Account portal makes request to the API server to generate token for the user
- 4. Account portal redirects user to the URL which was specified in returnURL.
- 5. User portal saves token and uses it with all following interaction with API server.
- ____________________________
- |____________________________|
- | |
- | |
- (1) | USER PORTAL |
- | |
- |____________________________|
- | USER PORTAL COOKIE STORAGE |
- | (5) token=DF798ASDGDDS7... |
- |____________________________|
- || /\
- (2) || || (4)
- || ||
- \/ ||
- ____________________________
- |____________________________|
- | |
- | |
- | ACCOUNT PORTAL |
- | |
- |____________________________|
- | ACCOUNT COOKIE STORAGE |
- | (3) token=DF798ASDGDDS7... |
- |____________________________|
- ### User comes to the Shop portal
- 1. There is no token for API (website can't interact with API server)
- 2. User is redirected to Account portal to specify credentions in login form.
- Request contains ?returnURL=shop.molecular-life.com/#/
- 3. Account portal already has the token (it was generated by previous interaction with User portal),
- so user is redirected to the URL which was specified in returnURL without any communication with API server.
- 4. Shop portal saves token and uses it with all following interaction with API server.
- ____________________________
- |____________________________|
- | |
- | |
- (1) | SHOP PORTAL |
- | |
- |____________________________|
- | SHOP PORTAL COOKIE STORAGE |
- | (4) token=DF798ASDGDDS7... |
- |____________________________|
- || /\
- (2) || || (3)
- || ||
- \/ ||
- ____________________________
- |____________________________|
- | |
- | |
- | ACCOUNT PORTAL |
- | |
- |____________________________|
- | ACCOUNT COOKIE STORAGE |
- | token=DF798ASDGDDS7... |
- |____________________________|
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement