12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #//# --------------------------------------------------------------------------------------
- #//# Created using Sequence Diagram for Mac
- #//# https://www.macsequencediagram.com
- #//# https://itunes.apple.com/gb/app/sequence-diagram/id1195426709?mt=12
- #//# --------------------------------------------------------------------------------------
- title "How to Create GateToken and Use for Api23 of Js Service"
- participant JsApp_Origin as origin
- participant Frontend_Laravel as frontend
- participant Backend_Golang as backend
- participant ErpDB as erpdb
- participant MemoryDB as bunt_db
- participant SsoServer as sso_svr
- activate origin
- activate frontend
- origin->frontend: request /api23-js \n Api23Key@HtmHeader, \n Json @htmBody
- activate backend
- frontend->backend: request /gate-token-get-api23hash \n {Api23Key}(j)
- backend->backend: extract Api23Hash %Api23Key
- bunt_db->backend: get GateToken @Api23Hash
- backend->frontend: [if GateToken exists] \n response 200 %{GateToke} \n else \n response 505
- deactivate backend
- alt [ if response was 505 ]
- frontend<->backend: /gate-token-get Process
- note over frontend, backend
- response _{GateToken}
- end note
- end
- #alt [if AppType=js]
- # frontend->origin: response 200 \n !%(json)
- #else [ else ]
- # frontend->origin: response 200 \n %{GateToken}
- #end
- deactivate backend
- frontend->frontend: insert GateToken, \n Referer @Htm Header
- activate backend
- frontend->backend: request regular Dabory API
- backend->frontend: response Dabory API result
- deactivate backend
- frontend->origin: response Js API result
- deactivate frontend
- deactivate origin
|