Skip to content

Commit

Permalink
Merge pull request #12 from openfort-xyz/chore/request-id-of-auth
Browse files Browse the repository at this point in the history
chore: add request id trace
  • Loading branch information
gllm-dev authored Jul 18, 2024
2 parents dfac1e9 + 48e173b commit b1d58e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.1.17]
### Updated
- Added X-Request-ID header to third party openfort authentication

## [v0.1.16]
### Fixed
- On share validator add encryption_session to validate project encryption
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"net/http"
"time"

"go.openfort.xyz/shield/pkg/contexter"

domainErrors "go.openfort.xyz/shield/internal/core/domain/errors"
"go.openfort.xyz/shield/internal/core/ports/factories"
"go.openfort.xyz/shield/pkg/jwk"
Expand Down Expand Up @@ -79,6 +81,7 @@ func (o *OpenfortIdentityFactory) thirdParty(ctx context.Context, token, authent

req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", o.publishableKey))
req.Header.Set("X-Request-ID", contexter.GetRequestID(ctx))
client := http.Client{Timeout: time.Minute}
resp, err := client.Do(req)
if err != nil {
Expand Down

0 comments on commit b1d58e6

Please sign in to comment.