-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor authentication middleware to include project_id in request t…
…racing Change the main authentication middleware to be a top level middleware that injects the authentication status into the request extensions. The per route middleware can then just read the AuthenticationStatus and take decisions based on it. This change allows us to capture the project id in the request tracing which wasn't possible before because it get invoked just before the request handlers (due to how middleware ordering works). The main change in behavior here is that the middleware will be invoked regardless of whether the route requires authentication or not. This is ok, unless the customer passes malformed auth headers in which case the request would currently fail with `BadRequest` while it would have succeeded before. Note, that we currently don't have any unauthenticated endpoints, so no "real" change in behavior here.
- Loading branch information
1 parent
5a26477
commit 398a076
Showing
5 changed files
with
155 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters