{% extends "page.html" %} {% block main %}

Manage JupyterHub Tokens

This note will help you keep track of what your tokens are for.
{% block expiration_options %} {% endblock expiration_options %} You can configure when your token will expire.
You can limit the permissions of the token so it can only do what you want it to. If none are specified, the token will have permission to do everything you can do. See the JupyterHub documentation for a list of available scopes.
{% if api_tokens %}

API Tokens

These are tokens with access to the JupyterHub API. Permissions for each token may be viewed via the JupyterHub tokens API. Revoking the API token for a running server will require restarting that server.

{% for token in api_tokens %} {% block token_row scoped %} {% endblock token_row %} {% endfor %}
Note Permissions Last used Created Expires
{{ token.note }}
scopes {% for scope in token.scopes %}
{{ scope }}
{% endfor %}
{%- if token.last_activity -%} {{ token.last_activity.isoformat() + 'Z' }} {%- else -%} Never {%- endif -%} {%- if token.created -%} {{ token.created.isoformat() + 'Z' }} {%- else -%} N/A {%- endif -%} {%- if token.expires_at -%} {{ token.expires_at.isoformat() + 'Z' }} {%- else -%} Never {%- endif -%}
{% endif %} {% if oauth_clients %}

Authorized Applications

These are applications that use OAuth with JupyterHub to identify users (mostly notebook servers). OAuth tokens can generally only be used to identify you, not take actions on your behalf.

{% for client in oauth_clients %} {% block client_row scoped %} {% endblock client_row %} {% endfor %}
Application Permissions Last used First authorized
{{ client['description'] }}
scopes {# create set of scopes on all tokens -#} {# sum concatenates all token.scopes into a single list -#} {# then filter to unique set and sort -#} {% for scope in client.tokens | sum(attribute="scopes", start=[]) | unique | sort %}
{{ scope }}
{% endfor %}
{%- if client['last_activity'] -%} {{ client['last_activity'].isoformat() + 'Z' }} {%- else -%} Never {%- endif -%} {%- if client['created'] -%} {{ client['created'].isoformat() + 'Z' }} {%- else -%} N/A {%- endif -%}
{% endif %}
{% endblock main %} {% block script %} {{ super() }} {% endblock script %}