-
Notifications
You must be signed in to change notification settings - Fork 0
/
sequence_document_with_auth.uml
48 lines (40 loc) · 1.25 KB
/
sequence_document_with_auth.uml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@startuml
!include default_style.iuml
participant Client
participant Document
participant Auth
Client -> Auth: reg(user, pass)
activate Auth
Auth -> Auth: register user "user"\nwith password "pass"
Auth -->> Client: :ok
deactivate Auth
Client -> Auth: gen(user, pass)
activate Auth
Auth -> Auth: generates a token "token"\nfor user "user"\nand stores it
Auth -->> Client: {:ok, token}
deactivate Auth
Client -> Document: put(token, key, doc)
activate Document
Document -> Auth: val(token)
activate Auth
Auth -> Auth: searches and finds user\nof token "token"
Auth -->> Document: {:ok, user}
deactivate Auth
Document -> Document: stores document "doc" \nwith key "key"
Document -->> Client: :ok
deactivate Document
Client -> Auth: rev(token)
activate Auth
Auth -> Auth: removes token "token"
Auth -->> Client: :ok
deactivate Auth
Client -> Document: put(token, key, doc)
activate Document
Document -> Auth: val(token)
activate Auth
Auth -> Auth: searches and\ndoes not find token "token"
Auth -->> Document: :error
deactivate Auth
Document -->> Client: :error
deactivate Document
@enduml