go-http-peering/doc/sequence-diagram/ping.plantuml
William Petit 3c44e82b65 Update sequence diagrams
- Use PlantUML
- Update README
2020-01-06 11:12:38 +01:00

17 lines
509 B
Plaintext

@startuml
Client -> Server: POST /ping\nX-Server-Token: <JWT_TOKEN>\nX-Client-Token: <JWT_TOKEN>
Server -> Server: Validate client/server tokens
alt Success
Server -> Server: Update last contact for peer ID
Server -> Client: 204 No Content
else Invalid client or server token
Server -> Client: 400 Bad request
else Peer not found
Server -> Client: 401 Unauthorized
else Peer rejected
Server -> Client: 403 Forbidden
else Unexpected error
Server -> Client: 500 Server error
end
@enduml