Skip to content

Commit

Permalink
Merge pull request ampproject#41 from andreban/fallback
Browse files Browse the repository at this point in the history
Added authorizationFallbackResponse to demo article
  • Loading branch information
andreban committed Feb 21, 2016
2 parents f659d9c + e61d6a9 commit 4013149
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions views/amp-access/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
{
"authorization": "<% host %>/amp-access/api/amp-authorization.json?rid=READER_ID&url=CANONICAL_URL&ref=DOCUMENT_REFERRER&_=RANDOM",
"pingback": "<% host %>/amp-access/api/amp-pingback?rid=READER_ID&ref=DOCUMENT_REFERRER&url=CANONICAL_URL",
"login": "<% host %>/amp-access/login/?rid=READER_ID&url=CANONICAL_URL"
"login": "<% host %>/amp-access/login/?rid=READER_ID&url=CANONICAL_URL",
"authorizationFallbackResponse": {
"error": true,
"access": false
}
}
</script>
<%> styles %>
Expand Down Expand Up @@ -79,7 +83,7 @@
<main role="main">
<article>

<section id="meter-notif" amp-access="access" class="meter-section" data-z-depth="2">
<section id="meter-notif" amp-access="access OR error" class="meter-section" data-z-depth="2">
<!--
This section is only visible by subscribers. The subscriber variable is
defined in the authentification response data.
Expand All @@ -102,6 +106,10 @@
Yay! The first click is free.
</div>

<div amp-access="error">
Ooops, something went wrong on the authorization endpoint!
</div>

<a on="tap:meter-notif.hide" role="button" tabindex="1">Dismiss</a>
</section>

Expand Down

0 comments on commit 4013149

Please sign in to comment.