diff options
| author | mo khan <mo@mokhan.ca> | 2025-04-16 16:15:21 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-04-16 16:15:21 -0600 |
| commit | 9e83b4b2e95254ba51c66ed15f400d3bec5712f1 (patch) | |
| tree | ed652b37c614d63b4dada2e580cf8ab5ef7c5864 /pkg/web/middleware | |
| parent | 3e70d67683e369d0b86db2bf3ff19df84e990710 (diff) | |
feat: attach middleware to unpack session cookie
Diffstat (limited to 'pkg/web/middleware')
| -rw-r--r-- | pkg/web/middleware/unpack_token.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/web/middleware/unpack_token.go b/pkg/web/middleware/unpack_token.go index 8993df1..b53d5d3 100644 --- a/pkg/web/middleware/unpack_token.go +++ b/pkg/web/middleware/unpack_token.go @@ -4,6 +4,7 @@ import ( "net/http" "github.com/xlgmokha/x/pkg/context" + "github.com/xlgmokha/x/pkg/log" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/oidc" ) @@ -26,6 +27,7 @@ func UnpackToken() func(http.Handler) http.Handler { return } + log.WithFields(r.Context(), log.Fields{"id_token": idToken}) next.ServeHTTP( w, r.WithContext(IDTokenContextKey.With(r.Context(), idToken)), |
