Skip to content

Commit d5f53a4

Browse files
Teqblaze Alias: AppStockSSP (#4265)
1 parent 439b9c0 commit d5f53a4

File tree

7 files changed

+195
-0
lines changed

7 files changed

+195
-0
lines changed

src/main/resources/bidder-config/teqblaze.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,24 @@ adapters:
1919
url: https://usync.rocketlab.ai/pbserver?gdpr={{gdpr}}&consent={{gdpr_consent}}&us_privacy={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&redirect={{redirect_url}}
2020
support-cors: false
2121
uid-macro: '[UID]'
22+
appStockSSP:
23+
enabled: false
24+
# We have the following regional endpoint domains: 'lb' - for US_EAST, 'ortb-eu' - for EU, 'ortb-apac' - for APAC
25+
# Please deploy this config in each of your datacenters with the appropriate regional subdomain
26+
endpoint: https://#{REGION}#.al-ad.com/pserver
27+
meta-info:
28+
maintainer-email: [email protected]
29+
usersync:
30+
enabled: true
31+
cookie-family-name: appStockSSP
32+
redirect:
33+
url: https://csync.al-ad.com/pbserver?gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&ccpa={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&redir={{redirect_url}}
34+
support-cors: false
35+
uid-macro: '[UID]'
36+
iframe:
37+
url: "https://csync.al-ad.com/pbserverIframe?gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&ccpa={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&pbserverUrl={{redirect_url}}"
38+
support-cors: false
39+
uid-macro: '[UID]'
2240
meta-info:
2341
maintainer-email: [email protected]
2442
app-media-types:
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package org.prebid.server.it;
2+
3+
import io.restassured.response.Response;
4+
import org.json.JSONException;
5+
import org.junit.jupiter.api.Test;
6+
import org.prebid.server.model.Endpoint;
7+
8+
import java.io.IOException;
9+
10+
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
11+
import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
12+
import static com.github.tomakehurst.wiremock.client.WireMock.post;
13+
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
14+
import static java.util.Collections.singletonList;
15+
16+
public class AppStockSspTest extends IntegrationTest {
17+
18+
@Test
19+
public void openrtb2AuctionShouldRespondWithBidsFromAppStockSsp() throws IOException, JSONException {
20+
// given
21+
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/appstockssp-exchange"))
22+
.withRequestBody(equalToJson(
23+
jsonFrom("openrtb2/appstockssp/test-appstockssp-bid-request.json")))
24+
.willReturn(aResponse().withBody(
25+
jsonFrom("openrtb2/appstockssp/test-appstockssp-bid-response.json"))));
26+
27+
// when
28+
final Response response = responseFor("openrtb2/appstockssp/test-auction-appstockssp-request.json",
29+
Endpoint.openrtb2_auction);
30+
31+
// then
32+
assertJsonEquals(
33+
"openrtb2/appstockssp/test-auction-appstockssp-response.json",
34+
response,
35+
singletonList("appStockSSP"));
36+
}
37+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"id": "request_id",
3+
"imp": [
4+
{
5+
"id": "imp_id",
6+
"banner": {
7+
"w": 300,
8+
"h": 250
9+
},
10+
"secure": 1,
11+
"ext": {
12+
"bidder": {
13+
"type": "publisher",
14+
"placementId": "testPlacementId"
15+
}
16+
}
17+
}
18+
],
19+
"site": {
20+
"domain": "www.example.com",
21+
"page": "http://www.example.com",
22+
"publisher": {
23+
"domain": "example.com"
24+
},
25+
"ext": {
26+
"amp": 0
27+
}
28+
},
29+
"device": {
30+
"ua": "userAgent",
31+
"ip": "193.168.244.1"
32+
},
33+
"at": 1,
34+
"tmax": "${json-unit.any-number}",
35+
"cur": [
36+
"USD"
37+
],
38+
"source": {
39+
"tid": "${json-unit.any-string}"
40+
},
41+
"regs": {
42+
"ext": {
43+
"gdpr": 0
44+
}
45+
},
46+
"ext": {
47+
"prebid": {
48+
"server": {
49+
"externalurl": "http://localhost:8080",
50+
"gvlid": 1,
51+
"datacenter": "local",
52+
"endpoint": "/openrtb2/auction"
53+
}
54+
}
55+
}
56+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"id": "request_id",
3+
"seatbid": [
4+
{
5+
"bid": [
6+
{
7+
"id": "bid_id",
8+
"impid": "imp_id",
9+
"price": 3.33,
10+
"crid": "creativeId",
11+
"mtype": 1,
12+
"ext": {
13+
"prebid": {
14+
"type": "banner"
15+
}
16+
}
17+
}
18+
]
19+
}
20+
]
21+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"id": "request_id",
3+
"imp": [
4+
{
5+
"id": "imp_id",
6+
"banner": {
7+
"w": 300,
8+
"h": 250
9+
},
10+
"ext": {
11+
"appStockSSP": {
12+
"placementId": "testPlacementId"
13+
}
14+
}
15+
}
16+
],
17+
"tmax": 5000,
18+
"regs": {
19+
"ext": {
20+
"gdpr": 0
21+
}
22+
}
23+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"id": "request_id",
3+
"seatbid": [
4+
{
5+
"bid": [
6+
{
7+
"id": "bid_id",
8+
"impid": "imp_id",
9+
"exp": 300,
10+
"price": 3.33,
11+
"crid": "creativeId",
12+
"mtype": 1,
13+
"ext": {
14+
"origbidcpm": 3.33,
15+
"prebid": {
16+
"type": "banner",
17+
"meta": {
18+
"adaptercode": "appStockSSP"
19+
}
20+
}
21+
}
22+
}
23+
],
24+
"seat": "appStockSSP",
25+
"group": 0
26+
}
27+
],
28+
"cur": "USD",
29+
"ext": {
30+
"responsetimemillis": {
31+
"appStockSSP": "{{ appStockSSP.response_time_ms }}"
32+
},
33+
"prebid": {
34+
"auctiontimestamp": 0
35+
},
36+
"tmaxrequest": 5000
37+
}
38+
}

src/test/resources/org/prebid/server/it/test-application.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,8 @@ adapters.teqblaze.aliases.pinkLion.enabled=true
575575
adapters.teqblaze.aliases.pinkLion.endpoint=http://localhost:8090/pinkLion-exchange
576576
adapters.teqblaze.aliases.rocketlab.enabled=true
577577
adapters.teqblaze.aliases.rocketlab.endpoint=http://localhost:8090/rocketlab-exchange
578+
adapters.teqblaze.aliases.appStockSSP.enabled=true
579+
adapters.teqblaze.aliases.appStockSSP.endpoint=http://localhost:8090/appstockssp-exchange
578580
adapters.theadx.enabled=true
579581
adapters.theadx.endpoint=http://localhost:8090/theadx-exchange
580582
adapters.tradplus.enabled=true

0 commit comments

Comments
 (0)