Main component is AMP-ACCESS.
- Authorization endpoint: AMP calls this URL to know user status: logged or not, permium or not, ...
- Pinback endpoint: AMP calls hits URL everytime the user reads an article. Used for metered paywalls
- Login endpoint: the URL where the user can log in, or register. The login takes place in client's domain, and this page is hosted by the client. This URL will be opened in a different browser tab. This URL will be called with a query param that indicates the URL where the user must be redirected to once the process has finished, so AMP runtime can take control again of the flow.
Example of an AMP document
- Amp will set display: none to any HTML element that has the attribute amp-access. Once Authorization Endpooint is called, the expression inside this attribute will be evaluated
- The result of Autorization Endpoint call is a custom JSON file
Example of Authorization callback
- Authorization endpoint returns
2. amp-access expression can then, contain, something like
- An user in AMP is always identifed with his AMP_READER_ID. It's up to the publisher to match an AMP_READER_ID with whatever user identification is stored in his database
- All premium content is obfuscated client side, via a CSS style. It's still under discussion how to do this server side. Currently the AMP team is evaluating if the AMP_ACCESS component and amp-access attribut expressions can be executed in the AMP cache
Default is “client”. The "server" option is under design discussion and these docs will be updated when it is ready.