Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ private HttpRequest<BidRequest> makeHttpRequest(Imp imp, BidRequest bidRequest,
final BidRequest outgoingRequest = bidRequest.toBuilder()
.imp(Collections.singletonList(modifiedImp))
.app(makeApp(bidRequest.getApp(), publisherId))
.ext(mapper.fillExtension(
ExtRequest.empty(), AudienceNetworkExt.of(platformId, makeAuthId(bidRequest.getId()))))
.ext(mapper.fillExtension(ExtRequest.empty(),
AudienceNetworkExt.of(platformId, makeAuthId(bidRequest.getId()),
platformId)))
Comment on lines +120 to +122
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix formatting

.ext(mapper.fillExtension(
        ExtRequest.empty(),
        AudienceNetworkExt.of(platformId, makeAuthId(bidRequest.getId()), platformId)))

.build();

return HttpRequest.<BidRequest>builder()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
package org.prebid.server.bidder.audiencenetwork.proto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Value;

@Value(staticConstructor = "of")
public class AudienceNetworkExt {

@JsonProperty("platformid")
String platformid;

@JsonProperty("authentication_id")
String authenticationId;

@JsonProperty("security_app_id")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JsonPropertys are redundant here, please remove

String securityAppId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ public void makeHttpRequestsShouldChangeRequestExt() {
.containsOnly(
AudienceNetworkExt.of(
"101",
"bd49902da11ce0fe6258e56baa0a69c2f1395b2ff1efb30d4879ed9e2343a3f6"));
"bd49902da11ce0fe6258e56baa0a69c2f1395b2ff1efb30d4879ed9e2343a3f6",
"101"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
},
"ext": {
"authentication_id": "48b7d18b921be9887a5351f31cc85f1326e3da1d8c402dec2bd338cf10bd6b43",
"platformid": "101"
"platformid": "101",
"security_app_id": "101"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I ask you to change values of the properties to something more readable like

"authentication_id": "authentication_id",
"platformid": "platformid",
"security_app_id": "platformid"

It'll be much more readable

P.S. I'd nice if you do the same in the AudienceNetworkBidderTest

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thanks @AntoxaAntoxic

}
}
Loading