Public spaces with password

how can I set a password on my own public space and give password to people I want, an example would be JupyterLab ducker that runs in form of space and uses a password to log in.