Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ping endpoint #25

Merged
merged 10 commits into from
Sep 21, 2020
Merged

Ping endpoint #25

merged 10 commits into from
Sep 21, 2020

Conversation

MakMuftic
Copy link
Member

@MakMuftic MakMuftic commented Sep 18, 2020

Changes

  • Implemented POST /api/v1/nodes/pings endpoint. Body should be empty, and only X-Auth-Header header set, @mpetrun5
  • Implemented auth middleware and refactored claims to use custom structure
  • Added test for ping endpoint and auth middleware

Issues

closes #3

TODO

This is a basic implementation of the ping endpoint as it only saves the latest timestamp for the specified node. Additional logic should be implemented to check when was the last ping and record if there were any downtime, also some reoccurring job should be implemented to check if some node hasn't invoked the ping endpoint for a longer time. This was out of the scope for this PR, especially with all refactoring and addition of auth related code in this PR.

@MakMuftic MakMuftic requested a review from mpetrunic September 18, 2020 14:05
@MakMuftic MakMuftic merged commit 810cd13 into master Sep 21, 2020
@MakMuftic MakMuftic deleted the mmuftic/ping-endpoint branch September 21, 2020 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ping request endpoint
3 participants