-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration.puml
35 lines (34 loc) · 1.04 KB
/
registration.puml
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
@startuml
'https://plantuml.com/sequence-diagram
participant Client
box "Auth" #LightYellow
participant Handler
participant Service
database Storage
end box
==OK==
autonumber 1.1
Client -> Handler: GRPC request:{login, password}
Handler -> Service: request
Service -> Service: credentials validation
Service -> Storage: Save {login, password hash}
Storage --> Service: (user_id, nil)
Service --> Handler: (user_id, nil)
Handler --> Client: GRPC response:{user_id}
==invalid credentials==
autonumber 2.1
Client -> Handler: GRPC request:{login, password}
Handler -> Service: request
Service -> Service: credentials validation
Service --> Handler: (0, ErrInvalidData)
Handler --> Client: GRPC response: {code:3 (InvalidArgument)}
==user already exists==
autonumber 3.1
Client -> Handler: GRPC request:{login, password}
Handler -> Service: request
Service -> Service: validation
Service -> Storage: (login, password hash)
Storage --> Service: (0, ErrUserExists)
Service --> Handler: (0, ErrUserExists)
Handler --> Client: GRPC response: {code:6 (AlreadyExists)}
@enduml