Skip to content

Commit b891408

Browse files
chore(internal): codegen related update
1 parent 3c735fe commit b891408

File tree

2 files changed

+0
-151
lines changed

2 files changed

+0
-151
lines changed

internal/requestconfig/oauth2.go

Lines changed: 0 additions & 140 deletions
This file was deleted.

internal/requestconfig/requestconfig.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,6 @@ type RequestConfig struct {
213213
HTTPClient *http.Client
214214
Middlewares []middleware
215215
AccessToken string
216-
// OAuth2State holds the OAuth2 provider configuration and cached token information
217-
OAuth2State *OAuth2State
218216
// If ResponseBodyInto not nil, then we will attempt to deserialize into
219217
// ResponseBodyInto. If Destination is a []byte, then it will return the body as
220218
// is.
@@ -412,15 +410,6 @@ func (cfg *RequestConfig) Execute() (err error) {
412410
}
413411
}
414412

415-
if cfg.OAuth2State != nil && cfg.Request.Header.Get("Authorization") == "" {
416-
token, err := cfg.OAuth2State.GetToken(cfg)
417-
if err != nil {
418-
return err
419-
}
420-
421-
cfg.Request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token))
422-
}
423-
424413
handler := cfg.HTTPClient.Do
425414
if cfg.CustomHTTPDoer != nil {
426415
handler = cfg.CustomHTTPDoer.Do

0 commit comments

Comments
 (0)