ManagerBotServer 是 ManagerBot 的配套网页。
- 创建 Python(>=3.7) 虚拟环境
virtualenv venv source venv/bin/activate
- 安装依赖
pip install -r requirements.txt
- 新建并配置
config.json
其中{ "ENV": "development", "JACCOUNT_CLIENT_ID": "", "JACCOUNT_CLIENT_SECRET": "", "JACCOUNT_ACCESS_TOKEN_URL": "https://jaccount.sjtu.edu.cn/oauth2/token", "JACCOUNT_AUTHORIZE_URL": "https://jaccount.sjtu.edu.cn/oauth2/authorize", "JACCOUNT_API_BASE_URL": "https://api.sjtu.edu.cn/", "JACCOUNT_CLIENT_KWARGS": { "scope": "openid", "token_endpoint_auth_method": "client_secret_basic", "token_placement": "header" }, "ATTESTATION_SECRET": "" }
secret
可以按照cmac_attestation.py
中的方式生成。 - 运行
app.py