diff --git a/adapters/audienceNetwork/audienceNetworktest/exemplary/banner.json b/adapters/audienceNetwork/audienceNetworktest/exemplary/banner.json index d0a85aa6692..632629b53a2 100644 --- a/adapters/audienceNetwork/audienceNetworktest/exemplary/banner.json +++ b/adapters/audienceNetwork/audienceNetworktest/exemplary/banner.json @@ -43,9 +43,6 @@ "Accept": [ "application/json" ], - "Auth-Token": [ - "test-app-id|test-app-secret" - ], "Content-Type": [ "application/json;charset=utf-8" ], diff --git a/adapters/audienceNetwork/audienceNetworktest/exemplary/interstitial.json b/adapters/audienceNetwork/audienceNetworktest/exemplary/interstitial.json index d31714ec44d..630e26d3f90 100644 --- a/adapters/audienceNetwork/audienceNetworktest/exemplary/interstitial.json +++ b/adapters/audienceNetwork/audienceNetworktest/exemplary/interstitial.json @@ -44,9 +44,6 @@ "Accept": [ "application/json" ], - "Auth-Token": [ - "test-app-id|test-app-secret" - ], "Content-Type": [ "application/json;charset=utf-8" ], diff --git a/adapters/audienceNetwork/audienceNetworktest/exemplary/native-1.1.json b/adapters/audienceNetwork/audienceNetworktest/exemplary/native-1.1.json index 2223422cc8b..288c7c14e5d 100644 --- a/adapters/audienceNetwork/audienceNetworktest/exemplary/native-1.1.json +++ b/adapters/audienceNetwork/audienceNetworktest/exemplary/native-1.1.json @@ -37,9 +37,6 @@ "Accept": [ "application/json" ], - "Auth-Token": [ - "test-app-id|test-app-secret" - ], "Content-Type": [ "application/json;charset=utf-8" ], diff --git a/adapters/audienceNetwork/audienceNetworktest/exemplary/video.json b/adapters/audienceNetwork/audienceNetworktest/exemplary/video.json index 070bcabf1ce..15563c2ada5 100644 --- a/adapters/audienceNetwork/audienceNetworktest/exemplary/video.json +++ b/adapters/audienceNetwork/audienceNetworktest/exemplary/video.json @@ -42,9 +42,6 @@ "Accept": [ "application/json" ], - "Auth-Token": [ - "test-app-id|test-app-secret" - ], "Content-Type": [ "application/json;charset=utf-8" ], diff --git a/adapters/audienceNetwork/audienceNetworktest/supplemental/multi-imp.json b/adapters/audienceNetwork/audienceNetworktest/supplemental/multi-imp.json index 4fd1eb33d23..0fe836af4de 100644 --- a/adapters/audienceNetwork/audienceNetworktest/supplemental/multi-imp.json +++ b/adapters/audienceNetwork/audienceNetworktest/supplemental/multi-imp.json @@ -62,9 +62,6 @@ "Accept": [ "application/json" ], - "Auth-Token": [ - "test-app-id|test-app-secret" - ], "Content-Type": [ "application/json;charset=utf-8" ], @@ -142,9 +139,6 @@ "Accept": [ "application/json" ], - "Auth-Token": [ - "test-app-id|test-app-secret" - ], "Content-Type": [ "application/json;charset=utf-8" ], diff --git a/adapters/audienceNetwork/facebook.go b/adapters/audienceNetwork/facebook.go index f8c993ba15b..a20a2393492 100644 --- a/adapters/audienceNetwork/facebook.go +++ b/adapters/audienceNetwork/facebook.go @@ -23,7 +23,6 @@ type FacebookAdapter struct { URI string nonSecureUri string platformID string - appID string appSecret string } @@ -75,7 +74,6 @@ func (this *FacebookAdapter) buildRequests(request *openrtb.BidRequest) ([]*adap headers.Add("Content-Type", "application/json;charset=utf-8") headers.Add("Accept", "application/json") - headers.Add("Auth-Token", this.appID+"|"+this.appSecret) headers.Add("X-Fb-Pool-Routing-Token", request.User.BuyerUID) for _, imp := range request.Imp { @@ -406,7 +404,7 @@ func resolveImpType(imp *openrtb.Imp) (openrtb_ext.BidType, bool) { return openrtb_ext.BidTypeBanner, false } -func NewFacebookBidder(client *http.Client, platformID string, appID string, appSecret string) adapters.Bidder { +func NewFacebookBidder(client *http.Client, platformID string, appSecret string) adapters.Bidder { if platformID == "" { glog.Errorf("No facebook partnerID specified. Calls to the Audience Network will fail. Did you set adapters.facebook.platform_id in the app config?") return &adapters.MisconfiguredBidder{ @@ -415,14 +413,6 @@ func NewFacebookBidder(client *http.Client, platformID string, appID string, app } } - if appID == "" { - glog.Errorf("No facebook app ID specified. Calls to the Audience Network will fail. Did you set adapters.facebook.app_id in the app config?") - return &adapters.MisconfiguredBidder{ - Name: "audienceNetwork", - Error: errors.New("Audience Network is not configured properly on this Prebid Server deploy. If you believe this should work, contact the company hosting the service and tell them to check their configuration."), - } - } - if appSecret == "" { glog.Errorf("No facebook app secret specified. Calls to the Audience Network will fail. Did you set adapters.facebook.app_secret in the app config?") return &adapters.MisconfiguredBidder{ @@ -439,7 +429,6 @@ func NewFacebookBidder(client *http.Client, platformID string, appID string, app //for AB test nonSecureUri: "http://an.facebook.com/placementbid.ortb", platformID: platformID, - appID: appID, appSecret: appSecret, } } diff --git a/adapters/audienceNetwork/facebook_test.go b/adapters/audienceNetwork/facebook_test.go index 2f685234e40..2ce0ef3ba64 100644 --- a/adapters/audienceNetwork/facebook_test.go +++ b/adapters/audienceNetwork/facebook_test.go @@ -38,5 +38,5 @@ type FacebookExt struct { } func TestJsonSamples(t *testing.T) { - adapterstest.RunJSONBidderTest(t, "audienceNetworktest", NewFacebookBidder(nil, "test-platform-id", "test-app-id", "test-app-secret")) + adapterstest.RunJSONBidderTest(t, "audienceNetworktest", NewFacebookBidder(nil, "test-platform-id", "test-app-secret")) } diff --git a/config/config.go b/config/config.go index c5e736d520e..c4aa788ee4d 100644 --- a/config/config.go +++ b/config/config.go @@ -231,7 +231,6 @@ type Adapter struct { // needed for Facebook PlatformID string `mapstructure:"platform_id"` - AppID string `mapstructure:"app_id"` AppSecret string `mapstructure:"app_secret"` } diff --git a/exchange/adapter_map.go b/exchange/adapter_map.go index 395b4a5d845..7febfd5e185 100644 --- a/exchange/adapter_map.go +++ b/exchange/adapter_map.go @@ -2,10 +2,11 @@ package exchange import ( "fmt" - "github.com/prebid/prebid-server/adapters/kubient" "net/http" "strings" + "github.com/prebid/prebid-server/adapters/kubient" + "github.com/prebid/prebid-server/adapters" ttx "github.com/prebid/prebid-server/adapters/33across" "github.com/prebid/prebid-server/adapters/adform" @@ -111,7 +112,6 @@ func newAdapterMap(client *http.Client, cfg *config.Configuration, infos adapter openrtb_ext.BidderFacebook: audienceNetwork.NewFacebookBidder( client, cfg.Adapters[strings.ToLower(string(openrtb_ext.BidderFacebook))].PlatformID, - cfg.Adapters[strings.ToLower(string(openrtb_ext.BidderFacebook))].AppID, cfg.Adapters[strings.ToLower(string(openrtb_ext.BidderFacebook))].AppSecret), }