Skip to content

Commit

Permalink
Use 'pubcid.org' as the source for pubcid in extended IDs (#4561)
Browse files Browse the repository at this point in the history
  • Loading branch information
pycnvr authored and mkendall07 committed Dec 10, 2019
1 parent 99a1822 commit 5b57f48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions modules/prebidServerBidAdapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ const OPEN_RTB_PROTOCOL = {
});

if (!imps.length) {
utils.logError('Request to Prebid Server rejected due to invalid media type(s) in adUnit.')
utils.logError('Request to Prebid Server rejected due to invalid media type(s) in adUnit.');
return;
}
const request = {
Expand Down Expand Up @@ -721,7 +721,7 @@ const OPEN_RTB_PROTOCOL = {

if (bidUserId.pubcid) {
request.user.ext.eids.push({
source: 'pubcommon',
source: 'pubcid.org',
uids: [{
id: bidUserId.pubcid,
}]
Expand Down Expand Up @@ -955,7 +955,7 @@ const isOpenRtb = () => {

const endpoint = (_s2sConfig && _s2sConfig.endpoint) || '';
return ~endpoint.indexOf(OPEN_RTB_PATH);
}
};

/*
* Returns the required protocol adapter to communicate with the configured
Expand Down
16 changes: 8 additions & 8 deletions test/spec/modules/prebidServerBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ describe('S2S Adapter', function () {

it('should not add outstrean without renderer', function () {
let ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction'
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';

config.setConfig({ s2sConfig: ortb2Config });
adapter.callBids(OUTSTREAM_VIDEO_REQUEST, BID_REQUESTS, addBidResponse, done, ajax);
Expand Down Expand Up @@ -611,7 +611,7 @@ describe('S2S Adapter', function () {

it('adds gdpr consent information to ortb2 request depending on presence of module', function () {
let ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction'
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';

let consentConfig = { consentManagement: { cmpApi: 'iab' }, s2sConfig: ortb2Config };
config.setConfig(consentConfig);
Expand Down Expand Up @@ -710,7 +710,7 @@ describe('S2S Adapter', function () {

it('is added to ortb2 request when in bidRequest', function () {
let ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction'
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';
config.setConfig({ s2sConfig: ortb2Config });

let uspBidRequest = utils.deepClone(BID_REQUESTS);
Expand Down Expand Up @@ -755,7 +755,7 @@ describe('S2S Adapter', function () {

it('is added to ortb2 request when in bidRequest', function () {
let ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction'
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';
config.setConfig({ s2sConfig: ortb2Config });

let consentBidRequest = utils.deepClone(BID_REQUESTS);
Expand Down Expand Up @@ -984,7 +984,7 @@ describe('S2S Adapter', function () {

const _config = {
s2sConfig: s2sConfig,
}
};

config.setConfig(_config);
adapter.callBids(REQUEST, BID_REQUESTS, addBidResponse, done, ajax);
Expand Down Expand Up @@ -1200,8 +1200,8 @@ describe('S2S Adapter', function () {
expect(requestBid.user.ext.eids.filter(eid => eid.source === 'adserver.org')[0].uids[0].id).is.equal('abc123');
expect(requestBid.user.ext.eids.filter(eid => eid.source === 'criteo.com')).is.not.empty;
expect(requestBid.user.ext.eids.filter(eid => eid.source === 'criteo.com')[0].uids[0].id).is.equal('44VmRDeUE3ZGJ5MzRkRVJHU3BIUlJ6TlFPQUFU');
expect(requestBid.user.ext.eids.filter(eid => eid.source === 'pubcommon')).is.not.empty;
expect(requestBid.user.ext.eids.filter(eid => eid.source === 'pubcommon')[0].uids[0].id).is.equal('1234');
expect(requestBid.user.ext.eids.filter(eid => eid.source === 'pubcid.org')).is.not.empty;
expect(requestBid.user.ext.eids.filter(eid => eid.source === 'pubcid.org')[0].uids[0].id).is.equal('1234');
expect(requestBid.user.ext.eids.filter(eid => eid.source === 'parrable.com')).is.not.empty;
expect(requestBid.user.ext.eids.filter(eid => eid.source === 'parrable.com')[0].uids[0].id).is.equal('01.1563917337.test-eid');
expect(requestBid.user.ext.eids.filter(eid => eid.source === 'liveintent.com')).is.not.empty;
Expand Down Expand Up @@ -1768,7 +1768,7 @@ describe('S2S Adapter', function () {

const _config = {
s2sConfig: s2sConfig,
}
};

config.setConfig(_config);
config.setConfig({ s2sConfig: CONFIG });
Expand Down

0 comments on commit 5b57f48

Please sign in to comment.