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

Mux Sub-routers and Security Middleware #5

Open
encima opened this issue Aug 8, 2018 · 0 comments
Open

Mux Sub-routers and Security Middleware #5

encima opened this issue Aug 8, 2018 · 0 comments

Comments

@encima
Copy link
Owner

encima commented Aug 8, 2018

Mux has great support for middlewares and OpenAPI allows for different security mechanisms on different routes.
An easy approach to this is to build a list of routes that require:

  • No auth
  • Token auth
  • Oauth
    and check in a single middleware

Right now, I think the best approach is create the three separate middlewares and create a sub router for each model, attaching the right middleware (based on the swagger file) to each route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant