Skip to content

Commit

Permalink
Black and Prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rschroll committed Jan 20, 2024
1 parent 1d9182d commit 551c652
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/service-whoami-flask/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ After logging in with your local-system credentials, you should see a JSON dump
}
```

This relies on the Hub starting the whoami service, via config (see [jupyterhub_config.py](./jupyterhub_config.py)). For ordinary users to access this service, they need to be given the appropriate scope (again, see [jupyterhub_config.py](./jupyterhub_config.py)).
This relies on the Hub starting the whoami service, via config (see [jupyterhub_config.py](./jupyterhub_config.py)). For ordinary users to access this service, they need to be given the appropriate scope (again, see [jupyterhub_config.py](./jupyterhub_config.py)).

A similar service could be run externally, by setting the JupyterHub service environment variables:

Expand Down
8 changes: 7 additions & 1 deletion examples/service-whoami-flask/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
},
]
c.JupyterHub.load_roles = [
{'name': 'user', 'scopes': ['access:services!service=whoami', 'self']}
{
'name': 'user',
'scopes': [
'access:services!service=whoami', # access this service
'self', # and all of the standard things for a user
],
}
]

# dummy auth and simple spawner for testing
Expand Down

0 comments on commit 551c652

Please sign in to comment.