Skip to content

Commit

Permalink
Updated network implementation guide. (#7862)
Browse files Browse the repository at this point in the history
* Updated network impl guide.

* Changed 'validation' to 'verification'
  • Loading branch information
bradfrizzell authored and lannka committed Mar 2, 2017
1 parent acf8bef commit 471b994
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ads/google/a4a/docs/Network-Impl-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ All network communication via the AMP HTML runtime (resources or XHR) require SS

In order for the AMP runtime to know that a creative is valid [AMP](https://github.com/ampproject/amphtml/blob/master/extensions/amp-a4a/amp-a4a-format.md), and thus receive preferential ad rendering, it must pass a client-side, validation check. The creative must be sent by the ad network to a validation service which verifies the creative conforms to the [specification](https://github.com/ampproject/amphtml/blob/master/extensions/amp-a4a/amp-a4a-format.md). If so, it will be rewritten by the validation service and the rewritten creative and a cryptographic signature will be returned to the ad network. The rewritten creative and signature must be included in the response to the AMP runtime from the ad network. extractCreativeAndSignature will then parse out the creative and the signature from the ad response. Lack of, or invalid signature will cause the runtime to treat it as a Legacy Ad, rendering it within a cross domain iframe and using delayed ad rendering.

Client side verification of the signature, and thus preferential rendering, requires a browser to have Web Crypto. However, if a browser does not have Web Crypto, Fast Fetch is still able to be used if the ad network permits it. In this case, the ad will simply be guaranteed to render in a cross-domain iframe.

### Ad Response Headers

*See Figure 1 above, Part C*
Expand Down

0 comments on commit 471b994

Please sign in to comment.