-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
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.
Looks OK.
Could possibly have a short explainer in middleware.go to clarify the cache flow (at least I got tripped up a few times thinking about it), but I'm fine with merging as is.
I agree, I'll see if I can refactor it a little bit after this PR to simplify it |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #295 +/- ##
==========================================
- Coverage 67.45% 67.34% -0.11%
==========================================
Files 10 10
Lines 1598 1611 +13
==========================================
+ Hits 1078 1085 +7
- Misses 484 489 +5
- Partials 36 37 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Background
We have use cases at CSC where we are using
sda-download
in three different contexts, and each of them have a different authentication middleware. We have been maintaining three separate implementations, and would now like to streamline them into a single codebase. These changes here would lay the foundation for the capabilities we need (changing middleware, more versatile cache), and then we would implement our needs in our private repository.Changes
app.middleware
, with a default valuedefault
TokenMiddleware
is now the default middleware, custom middlewares can be built in themiddleware
package, and be selected for runtime using the config (added a readme to the middleware directory for instructions)