1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #//# --------------------------------------------------------------------------------------
- #//# Created using Sequence Diagram for Mac
- #//# https://www.macsequencediagram.com
- #//# https://itunes.apple.com/gb/app/sequence-diagram/id1195426709?mt=12
- #//# --------------------------------------------------------------------------------------
- title "How to Prepare Api23Key for Widget Service"
- participant OriginJs as origin_js
- participant MemberFront as mem_front
- participant Laravel_env as dotenv
- participant UserFront as usr_front
- participant Backend as backend
- participant ProvDB as prov_db
- participant SsoServer as sso_svr
- == /api23e-key-pair-get ==
- activate usr_front
- *->usr_front: open setup(wp)@user-menu
- usr_front->usr_front: create \nApi23KeyPair\n #setup popup page
- activate backend
- usr_front->backend: request /api23e-key-pair-get \n %Api23KeyPair
- activate sso_svr
- backend->sso_svr: request /key-pair-get
- sso_svr->backend: response KeyPair
- deactivate sso_svr
- backend->backend: encrypt #Api23eKeyPair \n%Api23KeyPair, KeyPair
- backend->usr_front: response Api23eKeyPair
- deactivate backend
- usr_front-> usr_front: user check \n if it is Available
- activate backend
- usr_front->backend: request /setup-act \n % {Api23eKeyPair}
- backend->prov_db: save Api23eKeyPair\n @setup(t)
- backend->usr_front: response 200
- usr_front-> dotenv: seve Api23eKeyPair @.env
- deactivate backend
- deactivate usr_front
- == /api23-key-get ==
- activate mem_front
- *->mem_front:open FormA \nApi23-key-get page \n@member_menu
- mem_front->mem_front: input \n OriginUrl \n AppType(web/js/native-app) \n *native-app doses NOT have referer
- dotenv->mem_front: get ClientId@.env.dabory, \n Api23eKeyPair@.env
- activate backend
- mem_front->backend: request /api23-key-get \n%(ClientId, AppType, OriginUrl, Api23eKeyPair)
- activate sso_svr
- backend->sso_svr: request /key-pair-get
- sso_svr->backend: response KeyPair
- deactivate sso_svr
- backend->backend: decrypt #Api23KeyPair \n%Api23eKeyPair, KeyPair
- backend->backend: encrypt #Api23Key \n%{ClientId, OriginUrl,\nAppType, SsoSubId}(j),\n %Api23KeyPair
- backend->mem_front: show for user to copy-paste Api23Key
- deactivate backend
- mem_front->mem_front: member check \n if it is Available
- activate backend
- mem_front->backend: request /api23-key-act %{Api23Key}
- backend->prov_db: save Api23Key\n #api23_key@api23_key(t)
- backend->mem_front: response 200
- deactivate backend
- mem_front->origin_js: copy-paste \nApi23Key #js-file
- deactivate mem_front
|