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

Access authorization timeout #1933

Merged
merged 1 commit into from
Feb 12, 2016
Merged

Conversation

dvoytenko
Copy link
Contributor

Closes #1867.


Authorization endpoint is called by AMP Runtime as a credentialed CORS endpoint. As such, it must implement CORS protocol. It should use CORS Origin and source origin to restrict the access to this service as described in the [CORS Origin Security][9]. This endpoint may use publisher cookies for its needs. For instance, it can associate the binding between the Reader ID and the Publisher’s own user identity. AMP itself does not need to know about this (and prefers not to). Reader more on [AMP Reader ID][2] and [AMP Access and Cookies][11] for more detail.

AMP Runtime (or rather browser) observes cache response headers when calling Authorization endpoint. Thus the cached responses can be reused. It may or may not be desirable. If it is not desirable, the Publisher can user the appropriate cache control headers and/or RANDOM variable substitution for the endpoint URL.

Authorization request is automatically timed out and assumed to have failed after 4 seconds.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens in the failure case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on that part here: #1957

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged some part from #1957 on failing behavior. Will reconcile the rest as part of the #1957

@dvoytenko
Copy link
Contributor Author

Switched timeout to 3 seconds.

@cramforce
Copy link
Member

LGTM

dvoytenko added a commit that referenced this pull request Feb 12, 2016
Access authorization timeout
@dvoytenko dvoytenko merged commit 2f38ee1 into ampproject:master Feb 12, 2016
@dvoytenko dvoytenko deleted the access35 branch February 12, 2016 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants