Skip to content

Conversation

@minrk
Copy link
Member

@minrk minrk commented Sep 21, 2017

  • Raise 403 on unauthenticated API requests
    instead of redirecting to login page, which doesn't make sense for API handlers
    and can cause undesirable side effects when using custom login handlers as in JupyterHub
    (Redirect to login url on mismatched oauth state jupyterhub/jupyterhub#1438).
  • deprecate @json_errors decorator with write_error method
    on APIHandler, which is the natural and more robust place to implement custom error handling in Tornado.

instead of redirecting to human login page, which can have side effects
…or messages

this is the standard tornado way to do it, and catches errors at the `prepare` stage, which method decorators do not
Copy link
Member

@takluyver takluyver left a comment

Choose a reason for hiding this comment

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

This looks good to me. I'll leave it for a day or so in case others want to have a look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants