{"action":"created","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/2004","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/2004/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/2004/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/2004/events","html_url":"https://github.com/ampproject/amphtml/issues/2004","id":133449250,"number":2004,"title":"Timing and invalidation of authorization requests","user":{"login":"jugglingcats","id":526349,"avatar_url":"https://avatars.githubusercontent.com/u/526349?v=3","gravatar_id":"","url":"https://api.github.com/users/jugglingcats","html_url":"https://github.com/jugglingcats","followers_url":"https://api.github.com/users/jugglingcats/followers","following_url":"https://api.github.com/users/jugglingcats/following{/other_user}","gists_url":"https://api.github.com/users/jugglingcats/gists{/gist_id}","starred_url":"https://api.github.com/users/jugglingcats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jugglingcats/subscriptions","organizations_url":"https://api.github.com/users/jugglingcats/orgs","repos_url":"https://api.github.com/users/jugglingcats/repos","events_url":"https://api.github.com/users/jugglingcats/events{/privacy}","received_events_url":"https://api.github.com/users/jugglingcats/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ampproject/amphtml/labels/Related%20to:%20Access","name":"Related to: Access","color":"d4c5f9"},{"url":"https://api.github.com/repos/ampproject/amphtml/labels/Type:%20Question","name":"Type: Question","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"dvoytenko","id":726049,"avatar_url":"https://avatars.githubusercontent.com/u/726049?v=3","gravatar_id":"","url":"https://api.github.com/users/dvoytenko","html_url":"https://github.com/dvoytenko","followers_url":"https://api.github.com/users/dvoytenko/followers","following_url":"https://api.github.com/users/dvoytenko/following{/other_user}","gists_url":"https://api.github.com/users/dvoytenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dvoytenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvoytenko/subscriptions","organizations_url":"https://api.github.com/users/dvoytenko/orgs","repos_url":"https://api.github.com/users/dvoytenko/repos","events_url":"https://api.github.com/users/dvoytenko/events{/privacy}","received_events_url":"https://api.github.com/users/dvoytenko/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ampproject/amphtml/milestones/2","html_url":"https://github.com/ampproject/amphtml/milestones/M1","labels_url":"https://api.github.com/repos/ampproject/amphtml/milestones/2/labels","id":1537238,"number":2,"title":"M1","description":"","creator":{"login":"rudygalfi","id":3888212,"avatar_url":"https://avatars.githubusercontent.com/u/3888212?v=3","gravatar_id":"","url":"https://api.github.com/users/rudygalfi","html_url":"https://github.com/rudygalfi","followers_url":"https://api.github.com/users/rudygalfi/followers","following_url":"https://api.github.com/users/rudygalfi/following{/other_user}","gists_url":"https://api.github.com/users/rudygalfi/gists{/gist_id}","starred_url":"https://api.github.com/users/rudygalfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rudygalfi/subscriptions","organizations_url":"https://api.github.com/users/rudygalfi/orgs","repos_url":"https://api.github.com/users/rudygalfi/repos","events_url":"https://api.github.com/users/rudygalfi/events{/privacy}","received_events_url":"https://api.github.com/users/rudygalfi/received_events","type":"User","site_admin":false},"open_issues":43,"closed_issues":46,"state":"open","created_at":"2016-01-22T23:49:52Z","updated_at":"2016-02-16T05:29:38Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-02-13T17:12:02Z","updated_at":"2016-02-16T12:54:06Z","closed_at":null,"body":"Apologies if this is already covered in the documentation. I couldn't find it.\r\n\r\nIt would be useful to know if the authorization endpoint is intended to be called prior to the user following an AMP document link. For example, will the client request authorization for some/all links in a search results page? If so this has a few implications:\r\n\r\n- Potentially significant increased load placed on the authorization endpoint. This may have a commercial impact for some publishers using a vendor with tiered pricing based on number of API requests\r\n\r\n- After viewing a document and calling the pingback url, it will be important to invalidate any previously fetched authorizations, because in a metering scenario any previous decision might be incorrect after one of the documents is viewed. There might be a scope issue here: would the client invalidate ALL authorization decisions, including those potentially from other sites which are completely unrelated?\r\n\r\n- There are times when invalidation is not strictly necessary, for example if the user is a subscriber. Unfortunately using cache directives in this case would be problematic because the response is personalised to each user, unless AMP Cache could use the reader id as a cache key. This would be possible using a Vary header in the authorization response, but only if the reader id was passed as a header as well as a parameter, and if AMP Cache supports Vary of course\r\n\r\nIf the authorization endpoint is always called as part of the actual rendering process, most of these considerations don't apply."},"comment":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/comments/184670131","html_url":"https://github.com/ampproject/amphtml/issues/2004#issuecomment-184670131","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/2004","id":184670131,"user":{"login":"jugglingcats","id":526349,"avatar_url":"https://avatars.githubusercontent.com/u/526349?v=3","gravatar_id":"","url":"https://api.github.com/users/jugglingcats","html_url":"https://github.com/jugglingcats","followers_url":"https://api.github.com/users/jugglingcats/followers","following_url":"https://api.github.com/users/jugglingcats/following{/other_user}","gists_url":"https://api.github.com/users/jugglingcats/gists{/gist_id}","starred_url":"https://api.github.com/users/jugglingcats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jugglingcats/subscriptions","organizations_url":"https://api.github.com/users/jugglingcats/orgs","repos_url":"https://api.github.com/users/jugglingcats/repos","events_url":"https://api.github.com/users/jugglingcats/events{/privacy}","received_events_url":"https://api.github.com/users/jugglingcats/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T12:54:06Z","updated_at":"2016-02-16T12:54:06Z","body":"Thanks @dvoytenko I appreciate your taking the time to respond - everything makes sense. We will wait and see what happens to the authorization endpoint load ;-)"}}