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

20 lines
654 B
Plaintext

@startuml
Client -> Server: POST /update\nX-Server-Token: <JWT_TOKEN>\nX-Client-Token: <JWT_TOKEN>\n\n{"Attributes": <PEER_ATTRIBUTES>}
Server -> Server: Validate client/server tokens
alt Success
Server -> Server: Save attributes
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 Malformed update request
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