Skip to content

Commit

Permalink
support facebook app_secret config param (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aadeshp authored and SyntaxNode committed Dec 11, 2019
1 parent 139e533 commit 389d940
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ func setBidderDefaults(v *viper.Viper, bidder string) {
v.SetDefault(adapterCfgPrefix+bidder+".endpoint", "")
v.SetDefault(adapterCfgPrefix+bidder+".usersync_url", "")
v.SetDefault(adapterCfgPrefix+bidder+".platform_id", "")
v.SetDefault(adapterCfgPrefix+bidder+".app_secret", "")
v.SetDefault(adapterCfgPrefix+bidder+".xapi.username", "")
v.SetDefault(adapterCfgPrefix+bidder+".xapi.password", "")
v.SetDefault(adapterCfgPrefix+bidder+".xapi.tracker", "")
Expand Down
3 changes: 3 additions & 0 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"time"

"encoding/json"

"github.com/prebid/prebid-server/openrtb_ext"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -91,6 +92,7 @@ adapters:
endpoint: http://facebook.com/pbs
usersync_url: http://facebook.com/ortb/prebid-s2s
platform_id: abcdefgh1234
app_secret: 987abc
ix:
endpoint: http://ixtest.com/api
rubicon:
Expand Down Expand Up @@ -256,6 +258,7 @@ func TestFullConfig(t *testing.T) {
cmpStrings(t, "adapters.audiencenetwork.endpoint", cfg.Adapters[strings.ToLower(string(openrtb_ext.BidderFacebook))].Endpoint, "http://facebook.com/pbs")
cmpStrings(t, "adapters.audiencenetwork.usersync_url", cfg.Adapters[strings.ToLower(string(openrtb_ext.BidderFacebook))].UserSyncURL, "http://facebook.com/ortb/prebid-s2s")
cmpStrings(t, "adapters.audiencenetwork.platform_id", cfg.Adapters[strings.ToLower(string(openrtb_ext.BidderFacebook))].PlatformID, "abcdefgh1234")
cmpStrings(t, "adapters.audiencenetwork.app_secret", cfg.Adapters[strings.ToLower(string(openrtb_ext.BidderFacebook))].AppSecret, "987abc")
cmpStrings(t, "adapters.ix.endpoint", cfg.Adapters[strings.ToLower(string(openrtb_ext.BidderIx))].Endpoint, "http://ixtest.com/api")
cmpStrings(t, "adapters.rubicon.endpoint", cfg.Adapters[string(openrtb_ext.BidderRubicon)].Endpoint, "http://rubitest.com/api")
cmpStrings(t, "adapters.rubicon.usersync_url", cfg.Adapters[string(openrtb_ext.BidderRubicon)].UserSyncURL, "http://pixel.rubiconproject.com/sync.php?p=prebid")
Expand Down

0 comments on commit 389d940

Please sign in to comment.