-
Notifications
You must be signed in to change notification settings - Fork 69
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
Reusing brokerapi middlewares #83
Comments
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/168801074 The labels on this github issue will be updated when the story is started. |
Hi @desislavaa, Just to guarantee that we understand your question: You want to implement a custom auth middleware and reuse all the other broker middlewares (as defined here). That means that in your code you would have a function similar to If so, yes. Feel free to reuse the broker middlewares. That's actually why we have We would also be curious to hear if you have any ideas on how to make it easier for users of the brokerapi to provide custom middlewares. Let us know if you need further help. Thanks! |
That was exactly my question, thank you for the quick response! We thought about a wrapper function of If we pass user-provided middlewares instead, a problem would be their order, so the already present approach with adding them manually looks more suitable. Thanks again! |
I am working on a service broker that is supposed to do audit logging. In order for us to achieve that we need to use custom authentication middleware and later
AttachRoutes
to our router.Since adding reusable code in
pkg
folder is commonly used but not considered a standard in Go, my question is, can we attach thebrokerapi
middlewares instead of implementing our own? Is this functionality supposed to be reused?The text was updated successfully, but these errors were encountered: