Skip to main content

Jupyter Server Extension to inject the User Token into the Jupyter Server environment

Project description

jupyter-server-user-token

A simple Jupyter Server extension that adds the server's User Token (if it exists) into the process's environment as JUPYTER_SERVER_USER_TOKEN.

Why?

Some frontend extensions and visualisation libraries use iframes to render documents served out on Jupyter Server Proxy.

These iframes might have an href target like: /proxy/index.html?some=query-params and work happily when used in notebooks and lab.

In the context of myst the same visualisations run into issues when connecting to remote Jupyter servers running on different origins, as the cookie-based auth in play in a same-origin lab front ends, will fail on a typlical myst website.

By exposing the user token, end user code can do something about this and supply the user token string to the library / extension code that needs it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_server_user_token-0.1.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

jupyter_server_user_token-0.1.0-py2.py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page