Skip to content

Commit 7cb3e07

Browse files
authored
Merge branch 'main' into docs/provider-spec-updates
2 parents 0a8fd9c + 44edcc9 commit 7cb3e07

File tree

16 files changed

+400
-201
lines changed

16 files changed

+400
-201
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ __debug_bin
33
.vscode
44
dist/
55
.idea
6+
.cursor
67
*.pem
78
# ignore generated code
89
pkg/eval/flagd-definitions.json

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
same "printed page" as the copyright notice for easier
188188
identification within third-party archives.
189189

190-
Copyright [yyyy] [name of copyright owner]
190+
Copyright OpenFeature Maintainers
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.

core/go.mod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ require (
3333
go.uber.org/mock v0.5.2
3434
go.uber.org/zap v1.27.0
3535
gocloud.dev v0.42.0
36-
golang.org/x/crypto v0.39.0
36+
golang.org/x/crypto v0.45.0
3737
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac
38-
golang.org/x/mod v0.25.0
39-
golang.org/x/sync v0.15.0
38+
golang.org/x/mod v0.29.0
39+
golang.org/x/oauth2 v0.30.0
40+
golang.org/x/sync v0.18.0
4041
google.golang.org/grpc v1.73.0
4142
google.golang.org/protobuf v1.36.6
4243
gopkg.in/yaml.v3 v3.0.1
@@ -142,11 +143,10 @@ require (
142143
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
143144
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
144145
go.uber.org/multierr v1.11.0 // indirect
145-
golang.org/x/net v0.41.0 // indirect
146-
golang.org/x/oauth2 v0.30.0 // indirect
147-
golang.org/x/sys v0.33.0 // indirect
148-
golang.org/x/term v0.32.0 // indirect
149-
golang.org/x/text v0.26.0 // indirect
146+
golang.org/x/net v0.47.0 // indirect
147+
golang.org/x/sys v0.38.0 // indirect
148+
golang.org/x/term v0.37.0 // indirect
149+
golang.org/x/text v0.31.0 // indirect
150150
golang.org/x/time v0.11.0 // indirect
151151
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
152152
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect

core/go.sum

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY
372372
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
373373
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
374374
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
375+
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
376+
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
375377
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
376378
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac h1:l5+whBCLH3iH2ZNHYLbAe58bo7yrN4mVcnkHDYz5vvs=
377379
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac/go.mod h1:hH+7mtFmImwwcMvScyxUhjuVHR3HGaDPMn9rMSUUbxo=
@@ -386,6 +388,8 @@ golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
386388
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
387389
golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
388390
golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
391+
golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
392+
golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
389393
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
390394
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
391395
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -403,6 +407,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
403407
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
404408
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
405409
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
410+
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
411+
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
406412
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
407413
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
408414
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
@@ -417,6 +423,8 @@ golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
417423
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
418424
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
419425
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
426+
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
427+
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
420428
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
421429
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
422430
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -432,6 +440,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
432440
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
433441
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
434442
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
443+
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
444+
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
435445
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
436446
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
437447
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
@@ -440,6 +450,8 @@ golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
440450
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
441451
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
442452
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
453+
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
454+
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
443455
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
444456
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
445457
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
@@ -449,6 +461,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
449461
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
450462
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
451463
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
464+
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
465+
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
452466
golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
453467
golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
454468
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

core/pkg/sync/builder/syncbuilder_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,6 @@ func Test_SyncsFromFromConfig(t *testing.T) {
216216
CertPath: "/tmp/ca.cert",
217217
Selector: "source=database",
218218
},
219-
{
220-
URI: "https://host:port",
221-
Provider: syncProviderHTTP,
222-
BearerToken: "token",
223-
},
224219
{
225220
URI: "https://host:port",
226221
Provider: syncProviderHTTP,
@@ -251,7 +246,6 @@ func Test_SyncsFromFromConfig(t *testing.T) {
251246
wantSyncs: []sync.ISync{
252247
&grpc.Sync{},
253248
&http.Sync{},
254-
&http.Sync{},
255249
&file.Sync{},
256250
&kubernetes.Sync{},
257251
&blob.Sync{},

core/pkg/sync/builder/utils.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ func ParseSources(sourcesFlag string) ([]sync.SourceConfig, error) {
2222
if sp.Provider == "" {
2323
return syncProvidersParsed, errors.New("sync provider argument parse: provider is a required field")
2424
}
25-
if sp.AuthHeader != "" && sp.BearerToken != "" {
26-
return syncProvidersParsed, errors.New(
27-
"sync provider argument parse: both authHeader and bearerToken are defined, only one is allowed at a time",
28-
)
29-
}
3025
}
3126
return syncProvidersParsed, nil
3227
}

core/pkg/sync/builder/utils_test.go

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func TestParseSource(t *testing.T) {
2626
"multiple-syncs": {
2727
in: `[
2828
{"uri":"config/samples/example_flags.json","provider":"file"},
29-
{"uri":"http://test.com","provider":"http","bearerToken":":)"},
29+
{"uri":"http://test.com","provider":"http","authHeader":"Bearer :)"},
3030
{"uri":"host:port","provider":"grpc"},
3131
{"uri":"default/my-crd","provider":"kubernetes"},
3232
{"uri":"gs://bucket-name/path/to/file","provider":"gcs"},
@@ -42,7 +42,7 @@ func TestParseSource(t *testing.T) {
4242
{
4343
URI: "http://test.com",
4444
Provider: syncProviderHTTP,
45-
BearerToken: ":)",
45+
AuthHeader: "Bearer :)",
4646
},
4747
{
4848
URI: "host:port",
@@ -69,8 +69,6 @@ func TestParseSource(t *testing.T) {
6969
"multiple-syncs-with-options": {
7070
in: `[
7171
{"uri":"config/samples/example_flags.json","provider":"file"},
72-
{"uri":"http://my-flag-source.json","provider":"http","bearerToken":"bearer-dji34ld2l"},
73-
{"uri":"https://secure-remote","provider":"http","bearerToken":"bearer-dji34ld2l"},
7472
{"uri":"https://secure-remote","provider":"http","authHeader":"Bearer bearer-dji34ld2l"},
7573
{"uri":"https://secure-remote","provider":"http","authHeader":"Basic dXNlcjpwYXNz"},
7674
{"uri":"http://site.com","provider":"http","interval":77 },
@@ -84,16 +82,6 @@ func TestParseSource(t *testing.T) {
8482
URI: "config/samples/example_flags.json",
8583
Provider: syncProviderFile,
8684
},
87-
{
88-
URI: "http://my-flag-source.json",
89-
Provider: syncProviderHTTP,
90-
BearerToken: "bearer-dji34ld2l",
91-
},
92-
{
93-
URI: "https://secure-remote",
94-
Provider: syncProviderHTTP,
95-
BearerToken: "bearer-dji34ld2l",
96-
},
9785
{
9886
URI: "https://secure-remote",
9987
Provider: syncProviderHTTP,
@@ -127,22 +115,6 @@ func TestParseSource(t *testing.T) {
127115
},
128116
},
129117
},
130-
"multiple-auth-options": {
131-
in: `[
132-
{"uri":"https://secure-remote","provider":"http","authHeader":"Bearer bearer-dji34ld2l","bearerToken":"bearer-dji34ld2l"}
133-
]`,
134-
expectErr: true,
135-
out: []sync.SourceConfig{
136-
{
137-
URI: "https://secure-remote",
138-
Provider: syncProviderHTTP,
139-
AuthHeader: "Bearer bearer-dji34ld2l",
140-
BearerToken: "bearer-dji34ld2l",
141-
TLS: false,
142-
Interval: 0,
143-
},
144-
},
145-
},
146118
"empty": {
147119
in: `[]`,
148120
expectErr: false,

core/pkg/sync/http/http_sync.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ type Sync struct {
2929
cron Cron
3030
lastBodySHA string
3131
logger *logger.Logger
32-
bearerToken string
3332
authHeader string
3433
interval uint32
3534
ready bool
@@ -107,9 +106,6 @@ func (hs *Sync) ReSync(ctx context.Context, dataSync chan<- sync.DataSync) error
107106
}
108107

109108
func (hs *Sync) Init(_ context.Context) error {
110-
if hs.bearerToken != "" {
111-
hs.logger.Warn("Deprecation Alert: bearerToken option is deprecated, please use authHeader instead")
112-
}
113109
return nil
114110
}
115111

@@ -176,9 +172,6 @@ func (hs *Sync) fetchBody(ctx context.Context, fetchAll bool) (string, bool, err
176172

177173
if hs.authHeader != "" {
178174
req.Header.Set("Authorization", hs.authHeader)
179-
} else if hs.bearerToken != "" {
180-
bearer := fmt.Sprintf("Bearer %s", hs.bearerToken)
181-
req.Header.Set("Authorization", bearer)
182175
}
183176

184177
if hs.eTag != "" && !fetchAll {
@@ -299,7 +292,6 @@ func NewHTTP(config sync.SourceConfig, logger *logger.Logger) *Sync {
299292
zap.String("component", "sync"),
300293
zap.String("sync", "http"),
301294
),
302-
bearerToken: config.BearerToken,
303295
authHeader: config.AuthHeader,
304296
interval: interval,
305297
cron: cron.New(),

core/pkg/sync/http/http_sync_test.go

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ func TestHTTPSync_Fetch(t *testing.T) {
125125
tests := map[string]struct {
126126
setup func(t *testing.T, client *syncmock.MockClient)
127127
uri string
128-
bearerToken string
129128
authHeader string
130129
eTagHeader string
131130
lastBodySHA string
@@ -181,37 +180,6 @@ func TestHTTPSync_Fetch(t *testing.T) {
181180
}
182181
},
183182
},
184-
"authorization with bearerToken": {
185-
setup: func(t *testing.T, client *syncmock.MockClient) {
186-
expectedToken := "bearer-1234"
187-
client.EXPECT().Do(gomock.Any()).DoAndReturn(func(req *http.Request) (*http.Response, error) {
188-
actualAuthHeader := req.Header.Get("Authorization")
189-
if actualAuthHeader != "Bearer "+expectedToken {
190-
t.Fatalf("expected Authorization header to be 'Bearer %s', got %s", expectedToken, actualAuthHeader)
191-
}
192-
return &http.Response{
193-
Header: buildHeaders(map[string][]string{"Content-Type": {"application/json"}}),
194-
Body: io.NopCloser(strings.NewReader("test response")),
195-
StatusCode: http.StatusOK,
196-
}, nil
197-
})
198-
},
199-
uri: "http://localhost",
200-
bearerToken: "bearer-1234",
201-
lastBodySHA: "",
202-
handleResponse: func(t *testing.T, httpSync Sync, _ string, err error) {
203-
if err != nil {
204-
t.Fatalf("fetch: %v", err)
205-
}
206-
207-
expectedLastBodySHA := "UjeJHtCU_wb7OHK-tbPoHycw0TqlHzkWJmH4y6cqg50="
208-
if httpSync.lastBodySHA != expectedLastBodySHA {
209-
t.Errorf(
210-
"expected last body sha to be: '%s', got: '%s'", expectedLastBodySHA, httpSync.lastBodySHA,
211-
)
212-
}
213-
},
214-
},
215183
"authorization with authHeader": {
216184
setup: func(t *testing.T, client *syncmock.MockClient) {
217185
expectedHeader := "Basic dXNlcjpwYXNz"
@@ -348,7 +316,6 @@ func TestHTTPSync_Fetch(t *testing.T) {
348316
httpSync := Sync{
349317
uri: tt.uri,
350318
client: mockClient,
351-
bearerToken: tt.bearerToken,
352319
authHeader: tt.authHeader,
353320
lastBodySHA: tt.lastBodySHA,
354321
logger: logger.NewLogger(nil, false),
@@ -361,30 +328,6 @@ func TestHTTPSync_Fetch(t *testing.T) {
361328
}
362329
}
363330

364-
func TestSync_Init(t *testing.T) {
365-
tests := []struct {
366-
name string
367-
bearerToken string
368-
}{
369-
{"with bearerToken", "bearer-1234"},
370-
{"without bearerToken", ""},
371-
}
372-
373-
for _, tt := range tests {
374-
t.Run(tt.name, func(t *testing.T) {
375-
httpSync := Sync{
376-
bearerToken: tt.bearerToken,
377-
logger: logger.NewLogger(nil, false),
378-
}
379-
380-
if err := httpSync.Init(context.Background()); err != nil {
381-
t.Errorf("Init() error = %v", err)
382-
}
383-
})
384-
}
385-
386-
}
387-
388331
func TestHTTPSync_Resync(t *testing.T) {
389332
ctrl := gomock.NewController(t)
390333
source := "http://localhost"
@@ -393,7 +336,6 @@ func TestHTTPSync_Resync(t *testing.T) {
393336
tests := map[string]struct {
394337
setup func(t *testing.T, client *syncmock.MockClient)
395338
uri string
396-
bearerToken string
397339
lastBodySHA string
398340
handleResponse func(*testing.T, Sync, string, error)
399341
wantErr bool
@@ -448,7 +390,6 @@ func TestHTTPSync_Resync(t *testing.T) {
448390
httpSync := Sync{
449391
uri: tt.uri,
450392
client: mockClient,
451-
bearerToken: tt.bearerToken,
452393
lastBodySHA: tt.lastBodySHA,
453394
logger: logger.NewLogger(nil, false),
454395
}
@@ -617,7 +558,7 @@ func TestHTTPSync_OAuth(t *testing.T) {
617558
l := logger.NewLogger(nil, false)
618559
s := NewHTTP(sync.SourceConfig{
619560
URI: ts.URL,
620-
BearerToken: "it_should_be_replaced_by_oauth",
561+
AuthHeader: "Bearer it_should_be_replaced_by_oauth",
621562
OAuth: &sync.OAuthCredentialHandler{
622563
ClientID: clientID,
623564
ClientSecret: clientSecret,
@@ -710,7 +651,7 @@ func TestHTTPSync_OAuthFolderSecrets(t *testing.T) {
710651
l := logger.NewLogger(nil, false)
711652
s := NewHTTP(sync.SourceConfig{
712653
URI: ts.URL + flagsPath,
713-
BearerToken: "it_should_be_replaced_by_oauth",
654+
AuthHeader: "Bearer it_should_be_replaced_by_oauth",
714655
OAuth: &sync.OAuthCredentialHandler{
715656
ClientID: clientID,
716657
ClientSecret: clientSecret,

core/pkg/sync/isync.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ type SourceConfig struct {
3939
URI string `json:"uri"`
4040
Provider string `json:"provider"`
4141

42-
BearerToken string `json:"bearerToken,omitempty"`
4342
AuthHeader string `json:"authHeader,omitempty"`
4443
CertPath string `json:"certPath,omitempty"`
4544
TLS bool `json:"tls,omitempty"`

0 commit comments

Comments
 (0)