def token_authenticated(self):
    """Decorator for method authenticated only by Authorization token header

    (no cookies)
    """
    if self.get_current_user_token() is None:
        raise web.HTTPError(403)
Decorator for method authenticated only by Authorization token header

(no cookies)
jupyterhub/utils.py