encima / encima/openape

Mux Sub-routers and Security Middleware

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
working-on
Dominant language
Go
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.