2020-10-04

jupyterhub二次开发包括用户界面以及登录验证方式

首先是验证方式的改变,默认登录方式是用户是不能注册登录的,用户在第一次登录时设置他们的密码,而我们需要重新改变登录方式
参考链接:
修改默认登录方式的官方方法
步骤:
You must install this authenticator throught the project’s repository.
切换目录

cd /opt
git clone https://github.com/jupyterhub/nativeauthenticator.git

上面安装速度慢的话可以尝试下面命令

git clone https://gitee.com/ocean_industry_ty/nativeauthenticator.git

切换目录

cd /opt/nativeauthenticator/

进行安装

pip install -e .

通过配置文件修改默认登录认证方式

vim /etc/jupyterhub/jupyterhub_config.py

将下面内容添加进配置文件

c.JupyterHub.authenticator_class = 'nativeauthenticator.NativeAuthenticator'

下面为认证可选项可加可不加

c.Authenticator.allowed_failed_logins = 3
c.Authenticator.seconds_before_next_try = 1200
c.Authenticator.ask_email_on_signup = True

接下来就可以运行这个jupyterhub服务器了,参照上面步骤
需要注意的是即使前面已经注册过并且已经登录上去了,这里都必须重新注册一次,通过用前面已经成功登录的帐号再重新再注册一次

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值