Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Wrapper first pass #1784

Merged
merged 37 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
0eb6a1a
progress
hhhjort Feb 2, 2021
8f98d91
Another session
hhhjort Feb 8, 2021
7b96474
Worked on privacy
hhhjort Feb 22, 2021
6a3c0e2
Cleanups
hhhjort Mar 1, 2021
2227aa5
minor edits
hhhjort Mar 1, 2021
e66c3dc
minor edits
hhhjort Mar 1, 2021
dcc52e7
First draft, passes validation
hhhjort Mar 24, 2021
7f6106b
resolves merge conflicts
hhhjort Mar 31, 2021
5e885aa
final merge conflict
hhhjort Mar 31, 2021
1841a51
Resolve error from merge
hhhjort Mar 31, 2021
2ae30f5
PR comment responses
hhhjort Apr 8, 2021
b932f58
Move wrapper code to its own file.
hhhjort Apr 23, 2021
3de7d09
Removes Extract() functions on the Ext structs
hhhjort Apr 26, 2021
38fd1d6
Resolves merge conflicts
hhhjort Apr 27, 2021
6dc842e
Adds Get() and Set() methods to the Ext structs
hhhjort Apr 29, 2021
0c2a9a5
Add a few tests for code coverage
hhhjort Apr 29, 2021
69f99fb
PR review tweaks
hhhjort May 17, 2021
8b53ab3
Resolves merge conflicts
hhhjort May 18, 2021
dbb5017
Adds wrapper instructions in a comment
hhhjort Jun 7, 2021
1fd0b94
Simplify buildRegs() away
hhhjort Jun 7, 2021
dc2da82
Convert to private Ext objects in wrapper
hhhjort Jun 8, 2021
23ff039
Resolve merge conflict
hhhjort Jun 8, 2021
dec2668
Embed the original bid request into the wrapper
hhhjort Jun 9, 2021
894991d
Resolves some PR comments
hhhjort Jun 9, 2021
6b087b1
Merge branch 'master' of https://github.com/prebid/prebid-server into…
hhhjort Jun 10, 2021
bd8f49f
Move Ext object (un)marshal methods to private methods
hhhjort Jun 10, 2021
901e91d
Resolves merge conflicts
hhhjort Jun 10, 2021
caa75c4
Remove referrences to the wrapper from adapters
hhhjort Jun 22, 2021
5091206
Remove Legcy from ConsentWriter
hhhjort Jun 22, 2021
6c0e6b7
Remove unneeded BidRequests from req.BidRequest.XXX
hhhjort Jun 22, 2021
5c27730
Various PR comments
hhhjort Jun 22, 2021
b2ab5d5
minor PR comments resolved
hhhjort Jul 6, 2021
6c16550
PR comments resolved
hhhjort Jul 13, 2021
36c2c38
Fixes messy user.ext.eids handling
hhhjort Jul 13, 2021
7359d72
resolves more PR comments
hhhjort Jul 13, 2021
1b94ff8
Resolves merge conflicts (pull digitrust support)
hhhjort Jul 14, 2021
ef93e54
Resolves more PR comments
hhhjort Jul 19, 2021
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
2 changes: 1 addition & 1 deletion adapters/consumable/consumable.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (a *ConsumableAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *

gdpr := bidGdpr{}

ccpaPolicy, err := ccpa.ReadFromRequest(request)
ccpaPolicy, err := ccpa.ReadFromRequest(&openrtb_ext.RequestWrapper{BidRequest: request})
hhhjort marked this conversation as resolved.
Show resolved Hide resolved
if err == nil {
body.CCPA = ccpaPolicy.Consent
}
Expand Down
2 changes: 1 addition & 1 deletion adapters/sharethrough/butler.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (s StrOpenRTBTranslator) requestFromOpenRTB(imp openrtb2.Imp, request *open
}

usPolicySignal := ""
if usPolicy, err := ccpa.ReadFromRequest(request); err == nil {
if usPolicy, err := ccpa.ReadFromRequest(&openrtb_ext.RequestWrapper{BidRequest: request}); err == nil {
usPolicySignal = usPolicy.Consent
}

Expand Down
4 changes: 2 additions & 2 deletions endpoints/openrtb2/amp_auction.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func (deps *endpointDeps) parseAmpRequest(httpRequest *http.Request) (req *openr

// At this point, we should have a valid request that definitely has Targeting and Cache turned on

e = deps.validateRequest(req)
e = deps.validateRequest(&openrtb_ext.RequestWrapper{BidRequest: req})
errs = append(errs, e...)
return
}
Expand Down Expand Up @@ -531,7 +531,7 @@ func readPolicy(consent string) (privacy.PolicyWriter, error) {
}

if ccpa.ValidateConsent(consent) {
return ccpa.ConsentWriter{consent}, nil
return ccpa.ConsentWriterLegacy{consent}, nil
hhhjort marked this conversation as resolved.
Show resolved Hide resolved
}

return privacy.NilPolicyWriter{}, &errortypes.Warning{
Expand Down
1 change: 1 addition & 0 deletions endpoints/openrtb2/amp_auction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func TestGoodAmpRequests(t *testing.T) {

var response AmpResponse
if err := json.Unmarshal(recorder.Body.Bytes(), &response); err != nil {
t.Errorf("AMP response was: %s", recorder.Body.Bytes())
t.Fatalf("Error unmarshalling response: %s", err.Error())
}

Expand Down
Loading