mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 18:14:10 +00:00
add whoami-oauth-basic example
implements oauth without inheriting from HubOAuthenticated should be easier to parse for users with alternate oauth implementations
This commit is contained in:
19
examples/external-oauth/launch-service-basic.sh
Normal file
19
examples/external-oauth/launch-service-basic.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# the service needs to know:
|
||||
# 1. API token
|
||||
if [[ -z "${JUPYTERHUB_API_TOKEN}" ]]; then
|
||||
echo 'set API token with export JUPYTERHUB_API_TOKEN=$(openssl rand -hex 32)'
|
||||
fi
|
||||
|
||||
# 2. oauth client ID
|
||||
export JUPYTERHUB_CLIENT_ID='whoami-oauth-client-test'
|
||||
# 3. where the Hub is
|
||||
export JUPYTERHUB_URL='http://127.0.0.1:8000'
|
||||
|
||||
# 4. where to run
|
||||
export JUPYTERHUB_SERVICE_URL='http://127.0.0.1:5555'
|
||||
|
||||
# launch the service
|
||||
exec python3 whoami-oauth-basic.py
|
Reference in New Issue
Block a user