-
Notifications
You must be signed in to change notification settings - Fork 1
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
Authorization for Queue and Token Endpoints #22
Conversation
* Made gh action trigger on PRs also to get around stuck status checks (#19) * Made gh action trigger on PRs also to get around stuck status checks * Modified to trigger only on PRs * Renamed check * Add Token to Queue (#18) * implemented add token for queue store * implemented create token route * Fix code style issues with gofmt * read tokens in the queue in readqueue * Fix code style issues with gofmt * implemented token number * Fix code style issues with gofmt * added read token route * Fix code style issues with gofmt * separated name length constants * log insert error for add token * Fix code style issues with gofmt * refactoring mongo store * Fix code style issues with gofmt Co-authored-by: Lint Action <[email protected]> Co-authored-by: Nithin <[email protected]> Co-authored-by: Lint Action <[email protected]>
internal/handler/queue.go
Outdated
@@ -123,9 +122,26 @@ func DeleteQueue(w http.ResponseWriter, r *http.Request) { | |||
w.WriteHeader(http.StatusOK) | |||
} | |||
|
|||
func QueueCtx(next http.Handler) http.Handler { | |||
func QueueMiddlware(next http.Handler) http.Handler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to think of a good name for this middleware. QueueOwnerAuthMiddleware
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
Then I'll also rename TokenMiddleware
to TokenOwnerAuthMiddleware
Implemented authorization for queue -
uid
ReadQueue
/queue/{id}
endpointsImplemented authorization for token -
As discussed with @daltonfury42 we might need a shallow
ReadQueue
later which any user can read basic information about the queue from.