From c26d017113242f6268b3a83518e6bd5f5620d261 Mon Sep 17 00:00:00 2001 From: Leonid Bugaev Date: Thu, 28 Nov 2024 18:03:23 +0300 Subject: [PATCH] Merging to release-5.7.0: [TT-13658] added missing logger from provider initialisation (#6729) (#6731) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### **User description** [TT-13658] added missing logger from provider initialisation (#6729) ### **User description** TASK: https://tyktech.atlassian.net/browse/TT-13658 ## Description ## Related Issue ## Motivation and Context ## How This Has Been Tested ## Screenshots (if appropriate) ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) ## Checklist - [ ] I ensured that the documentation is up to date - [ ] I explained why this PR updates go.mod in detail with reasoning why it's required - [ ] I would like a code coverage CI quality gate exception and have explained why ___ ### **PR Type** Bug fix ___ ### **Description** - Added a missing logger to the `Provider` initialization in the `upstreamoauth` middleware. - This change ensures that logging is properly configured, preventing potential issues related to missing logs. ___ ### **Changes walkthrough** 📝
Relevant files
Bug fix
middleware.go
Add missing logger to Provider initialization                       

ee/middleware/upstreamoauth/middleware.go
  • Added a missing logger to the Provider initialization.
  • Ensures that the Logger is properly set in the upstreamOAuthProvider.
  • +1/-0     
    ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information [TT-13658]: https://tyktech.atlassian.net/browse/TT-13658?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ ___ ### **PR Type** Bug fix ___ ### **Description** - Added a missing logger to the `Provider` initialization in the `upstreamoauth` middleware. - This change ensures that logging is properly configured, preventing potential issues related to missing logs. ___ ### **Changes walkthrough** 📝
    Relevant files
    Bug fix
    middleware.go
    Add missing logger to Provider initialization                       

    ee/middleware/upstreamoauth/middleware.go
  • Added a missing logger to the Provider initialization.
  • Ensures that the Logger is properly set in the upstreamOAuthProvider.
  • +1/-0     
    ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information Co-authored-by: andrei-tyk <97896463+andrei-tyk@users.noreply.github.com> --- ee/middleware/upstreamoauth/middleware.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ee/middleware/upstreamoauth/middleware.go b/ee/middleware/upstreamoauth/middleware.go index 7a08595f328..29373cfbb92 100644 --- a/ee/middleware/upstreamoauth/middleware.go +++ b/ee/middleware/upstreamoauth/middleware.go @@ -80,6 +80,7 @@ func (m *Middleware) ProcessRequest(_ http.ResponseWriter, r *http.Request, _ in upstreamOAuthProvider := Provider{ HeaderName: header.Authorization, AuthValue: payload, + Logger: m.Logger(), } headerName := provider.getHeaderName(m)