Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Gitea de1218a7b4 | 3 years ago | |
---|---|---|
README.md | 3 years ago |
本项目作为竞赛平台和Git平台之间衔接的中间件,利用Git平台提供的API,为竞赛提供一站式用户注册和登录,
实现竞赛活动中相关的代码、数据、模型甚至运行环境的共享及统一管理。
注意:使用本项目提供的接口前,请先在OpenI平台注册,并生成授权Token,否则部分接口将无法使用。
1. 在OpenI平台注册账号
2. 申请OAuth2应用授权
2.1 登录OpenI平台,进入用户[设置页面](https://git.openi.org.cn/user/settings/applications)
2.2 点击标签`应用`,滑动到页面最下方`创建新的 OAuth2 应用程序`
2.3 输入`应用名称`和`重定向URI`,点击`创建应用`
2.4 跳转后页面显示该应用的`客户端ID`和`客户端密钥`,请保存该信息
2.5 点击保存,完成授权应用的创建
3. 参考如何使用OAuth第三方登录OpenI平台[示例代码](https://git.openi.org.cn/AI-Competition/node-oauth-example)
https://git.openi.org.cn/api/v1
POST:
/admin/users
CreateUserOption{
description:
CreateUserOption create user options
email* string($email)
full_name string
login_name string
must_change_password boolean
password* string
send_notify boolean
source_id integer($int64)
username* string
}
使用OAuth授权方式,用户可自行在OpenI平台注册,用户通过OAuth第三方应用授权方式获得用户授权token,参考OAuth2方式认证流程
以 git 平台进行大赛资源的统一管理,为更好地理解和操作,以下为相关内容的对应关系:
竞赛平台 | Git平台 |
---|---|
一届赛事 | 组织 |
赛事管理员 | 组织创建者 |
赛事公共资源 | 组织下的公共仓库 |
参赛队伍 | 组织内团队 |
参赛人员 | 用户 |
通过git中的组织、团队和项目等元素为基础,进行竞赛队伍以及各队伍所属项目权限管理。
1.创建项目
参考API接口:https://git.openi.org.cn/api/swagger#/organization/createOrgRepo
2.创建队伍
参考API接口:https://git.openi.org.cn/api/swagger#/organization/orgCreateTeam
3.添加队伍成员
参考API接口:https://git.openi.org.cn/api/swagger#/organization/orgAddTeamMember
由于该接口接收的team信息为team id,因此在调用创建队伍API后,需要保存队伍的id信息。
4.设置项目协作者
目前暂时未提供增加团队协助者的API。可以通过遍历团队成员,多次调用增加协作者接口,实现该功能。
参考API接口:
基于Git开源平台的竞赛资源共享及统一管理中间件
other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》