验证¶
ZJUI-Learn 目前有几种方法可以进行用户认证。
谷歌 OAuth 2¶
首先,创建一个 Google Cloud 帐户,然后:
- 点击控制台 登录控制台。
- 创建一个项目然后进入APIs & Services。
- 前往
OAuth consent screen并填写同意书。 - 继续
Credentials并创建一个新的OAuth client ID。 - 选择
Web application。 - 在授权的 JavaScript 来源下,单击
ADD URI并添加您的域。 - 在授权重定向 URI 下,单击
ADD URI并添加https://yourdomain.com/pl/oauth2callback,这是 Google OAuth 回调的路由。 - 单击
Create,这将为您提供Client ID和Client Secret。 对这些值保密。
- 前往
现在将密钥添加到 config.json:
config.json
{
"googleClientId": "Your Client ID key",
"googleClientSecret": "Your Client Secret key",
"googleRedirectUrl": "https://yourdomain.com/pl/oauth2callback",
"hasOauth": true
}
您现在应该能够使用 Google 登录您的 ZJUI-Learn 实例。
长时指数¶
查看课程实例 LTI 文档 以了解有关 LTI 的更多信息。