https://auth.example.com 请换成你的 Casdoor 地址(Casdoor 云上类似 https://acme.casdoor.com),其他 example.com 地址也换成你自己的。用 Casdoor 配置 超星学习通
- 1
注册超星微服务开放平台账号
在超星微服务开放平台
open.chaoxing.com注册账号。个人账号只能调用 OAuth 认证接口,接登录已经够用;企业账号要等平台审核。 - 2
创建应用
在开放平台上传一个应用(全网可用的市场应用),或在学校的微服务单位里用应用链接地址建自建应用。服务地址填 Casdoor 的回调地址:
服务地址 https://auth.example.com/callback - 3
查看 APP ID 和 APP KEY
应用建好后在开放平台查看它的 APP ID 和 APP KEY。在 Casdoor 里安装时,Client ID 填 APP ID,Client secret 填 APP KEY。
- 4
在 Casdoor 中添加 超星学习通 提供商
在 Casdoor 控制台打开 提供商,点击 添加,填写:
类别 OAuth 类型 Custom 显示名称 超星学习通 客户端ID <client ID> 客户端密钥 <client secret> 认证URL https://auth.chaoxing.com/connect/oauth2/authorize?appid={clientId}&redirect_uri={redirectUri}&response_type=code&scope={scope}&state={state} Token链接 https://auth.chaoxing.com/sns/oauth2/access_token/v1.0?appid={clientId}&secret={clientSecret}&code={code}&grant_type=authorization_code 范围 snsapi_base UserInfo链接 https://v1.chaoxing.com/backSchool/user/getUserByTokenFormMooc?access_token={access_token}&openid={openid}&expires_time={expires_time}&state={state} 启用PKCE 关闭 用户映射:id userInfo.uid 用户映射:displayName userInfo.displayName - 5
把提供商加到应用上
打开 应用,编辑用户登录的那个应用,在它的 提供商 标签页添加这个提供商。之后登录页上就会出现 超星学习通 按钮。
注意事项
- 超星要求授权时账号已经登录学习通,没登录会返回错误 10013,所以最适合从学习通、超星微服务平台里点进来的场景。
- Casdoor 用学习通的用户 ID(
uid)关联账号,显示名取姓名。学工号在不同学校可能重复,所以没有用作用户名。 - 这个集成是按超星公开的接口文档写的,还没有用真实应用走通过;遇到问题请到 GitHub 的 casdoor/casdoor 提 issue。
超星学习通 的设置取自它的官方文档(核对于 2026年10月:超星微服务开放平台:对接流程、应用方获取认证 code 码、应用方获取授权 access_token、获取用户信息接口)。超星学习通 是其所有者的商标。
更多身份提供商
查看全部Authelia
身份提供商Let people sign in to Casdoor through Authelia over OpenID Connect: the provider settings, and the client to add to Authelia's configuration.
authentik
身份提供商Let people sign in to Casdoor with their authentik accounts over OpenID Connect: the provider settings, and the application and OAuth2 provider to create in authentik.
GitLab Self-Managed
身份提供商Let people sign in to Casdoor with accounts on your own GitLab over OpenID Connect: the provider settings, and the OAuth application to create in GitLab.

