api23-prepare.msd 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #//# --------------------------------------------------------------------------------------
  2. #//# Created using Sequence Diagram for Mac
  3. #//# https://www.macsequencediagram.com
  4. #//# https://itunes.apple.com/gb/app/sequence-diagram/id1195426709?mt=12
  5. #//# --------------------------------------------------------------------------------------
  6. title "How to Prepare Api23Key for Widget Service"
  7. participant OriginJs as origin_js
  8. participant MemberFront as mem_front
  9. participant Laravel_env as dotenv
  10. participant UserFront as usr_front
  11. participant Backend as backend
  12. participant ProvDB as prov_db
  13. participant SsoServer as sso_svr
  14. == /api23e-key-pair-get ==
  15. activate usr_front
  16. *->usr_front: open setup(wp)@user-menu
  17. usr_front->usr_front: create \nApi23KeyPair\n #setup popup page
  18. activate backend
  19. usr_front->backend: request /api23e-key-pair-get \n %Api23KeyPair
  20. activate sso_svr
  21. backend->sso_svr: request /key-pair-get
  22. sso_svr->backend: response KeyPair
  23. deactivate sso_svr
  24. backend->backend: encrypt #Api23eKeyPair \n%Api23KeyPair, KeyPair
  25. backend->usr_front: response Api23eKeyPair
  26. deactivate backend
  27. usr_front-> usr_front: user check \n if it is Available
  28. activate backend
  29. usr_front->backend: request /setup-act \n % {Api23eKeyPair}
  30. backend->prov_db: save Api23eKeyPair\n @setup(t)
  31. backend->usr_front: response 200
  32. usr_front-> dotenv: save Api23eKeyPair @.env
  33. deactivate backend
  34. deactivate usr_front
  35. == /api23-key-get ==
  36. activate mem_front
  37. *->mem_front:open FormA \nApi23-key-get page \n@member_menu
  38. mem_front->mem_front: input \n OriginUrl \n AppType(web/js/native-app) \n *native-app doses NOT have referer
  39. dotenv->mem_front: get ClientId@.env.dabory, \n Api23eKeyPair@.env
  40. activate backend
  41. mem_front->backend: request /api23-key-get \n%(ClientId, AppType, OriginUrl, Api23eKeyPair)
  42. activate sso_svr
  43. backend->sso_svr: request /key-pair-get
  44. sso_svr->backend: response KeyPair
  45. deactivate sso_svr
  46. backend->backend: decrypt #Api23KeyPair \n%Api23eKeyPair, KeyPair
  47. backend->backend: encrypt #Api23Key \n%{ClientId, OriginUrl,\nAppType, SsoSubId}(j),\n %Api23KeyPair
  48. backend->mem_front: show for user to copy-paste Api23Key
  49. deactivate backend
  50. mem_front->mem_front: member check \n if it is Available
  51. activate backend
  52. mem_front->backend: request /api23-key-act %{Api23Key}
  53. backend->prov_db: save Api23Key\n #api23_key@api23_key(t)
  54. backend->mem_front: response 200
  55. deactivate backend
  56. mem_front->origin_js: copy-paste \nApi23Key #js-file
  57. deactivate mem_front