Skip to content

Commit 5a69671

Browse files
committed
sequence.md: add diagram for adding a new user.
1 parent 49fc036 commit 5a69671

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

sequence.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,23 @@ sequenceDiagram
293293
end
294294
Note right of Backend: Saves: <br> - login-key <br> login-salt <br> - secret-salt <br> - encrypted secret
295295
```
296+
297+
### Add new user
298+
```mermaid
299+
sequenceDiagram
300+
Note left of Charger Frontend: User provides some kind of<br>authentication for new user
301+
Note over Charger Frontend: Generates new WireGuard keys
302+
Charger Frontend->>Charger: Sends authentication data and WireGuard keys
303+
Note over Charger: Read public key from authentication data and<br>encrypt WireGuard keys
304+
Charger->>Backend: Sends authentication data and<br>encrypted WireGuard keys
305+
Note over Backend: Authenticates request and stores keys
306+
alt auth successfull
307+
Backend->>Charger: Indicate success
308+
Note over Charger: Save WireGuard keys and user mail
309+
Charger->>Charger Frontend: Indicate success
310+
else auth failed
311+
Backend->>Charger: Indicate failure
312+
Note over Charger: Forget WireGuard keys and user data
313+
Charger->>Charger Frontend: Indicate failure
314+
end
315+
```

0 commit comments

Comments
 (0)