Hi,
I try to add a list of users and passwords to jupyterhub_config.py. Based on the docs
https://jupyterhub.readthedocs.io/en/stable/reference/authenticators.html#how-the-base-authenticator-works
I’ve tried the following
from jupyterhub.auth import Authenticator
class DictionaryAuthenticator(Authenticator):
passwords = {'peter':'777'}
async def authenticate(self, handler, data):
if self.passwords.get(data['username']) == data['password']:
return data['username']
c.JupyterHub.authenticator_class = 'DictionaryAuthenticator'
But when starting the container it throws the following error:
jupyterhub | File "/srv/jupyterhub/jupyterhub_config.py", line 55, in <module>
jupyterhub | from jupyterhub.auth import Authenticator
jupyterhub | ModuleNotFoundError: No module named 'jupyterhub'
What is the correct way to add this dictionary authenticator?
TIA!
Alex