From 1eda00b7214ca12ffd353fa5e46b8d0affba29f4 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 6 Sep 2023 09:41:51 +0200 Subject: [PATCH 1/2] Small fixes to services docs --- docs/source/reference/services.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/source/reference/services.md b/docs/source/reference/services.md index f3d4ed38..115467d9 100644 --- a/docs/source/reference/services.md +++ b/docs/source/reference/services.md @@ -156,8 +156,8 @@ to perform its API requests. Each Externally-Managed Service will need a unique API token, because the Hub authenticates each API request and the API token is used to identify the originating Service or user. -A configuration example of an Externally-Managed Service with admin access and -running its own web server is: +A configuration example of an Externally-Managed Service running its own web +server is: ```python c.JupyterHub.services = [ @@ -278,7 +278,7 @@ There are two levels of authentication with the Hub: This should be used for any service that serves pages that should be visited with a browser. To use HubAuth, you must set the `.api_token` instance variable. This can be -done either programmatically when constructing the class, or via the +done via the HubAuth constructor, direct assignment to a HubAuth object, or via the `JUPYTERHUB_API_TOKEN` environment variable. A number of the examples in the root of the jupyterhub git repository set the `JUPYTERHUB_API_TOKEN` variable so consider having a look at those for futher reading @@ -287,8 +287,6 @@ so consider having a look at those for futher reading [service-notebook](https://github.com/jupyterhub/jupyterhub/tree/master/examples/service-notebook) and [service-whoiami](https://github.com/jupyterhub/jupyterhub/tree/master/examples/service-whoami)) -(TODO: Where is this API TOKen set?) - Most of the logic for authentication implementation is found in the {meth}`.HubAuth.user_for_token` methods, which makes a request of the Hub, and returns: @@ -340,7 +338,7 @@ for more details. ### Authenticating tornado services with JupyterHub Since most Jupyter services are written with tornado, -we include a mixin class, [`HubOAuthenticated`][huboauthenticated], +we include a mixin class, {class}`~.HubOAuthenticated`, for quickly authenticating your own tornado services with JupyterHub. Tornado's {py:func}`~.tornado.web.authenticated` decorator calls a Handler's {py:meth}`~.tornado.web.RequestHandler.get_current_user` From 841913a1d1b257b53d69e0154b493bffd32d0667 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Fri, 8 Sep 2023 19:18:20 -0700 Subject: [PATCH 2/2] Remove ~ from .HubOAuthenticated reference --- docs/source/reference/services.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/reference/services.md b/docs/source/reference/services.md index 115467d9..edaa3168 100644 --- a/docs/source/reference/services.md +++ b/docs/source/reference/services.md @@ -338,7 +338,7 @@ for more details. ### Authenticating tornado services with JupyterHub Since most Jupyter services are written with tornado, -we include a mixin class, {class}`~.HubOAuthenticated`, +we include a mixin class, {class}`.HubOAuthenticated`, for quickly authenticating your own tornado services with JupyterHub. Tornado's {py:func}`~.tornado.web.authenticated` decorator calls a Handler's {py:meth}`~.tornado.web.RequestHandler.get_current_user`