luogu-api-docs

身份验证 API

: _uid__client_id 是有关会话状态的 cookie。本页面部分接口可能要求从 / 以外的特定路径获取 CSRF 令牌

获取图片验证码

请求 GET /lg4/captcha
响应主体 image/jpeg

发送注册验证码

请求 POST /auth/motp/to
参数 { endpoint: number, exist: number }
请求主体 application/json ({ endpoint: string, captcha: string })
响应主体 application/json ({})

注册

请求 POST /auth/finish-signup
请求主体 application/json (RegisterRequest)
响应主体 application/json ({})

登录

请求 POST /do-auth/password
请求主体 application/json (LoginRequest)
响应主体 application/json (LoginResponse)

通过 OpenID 登录

: 重定向到对应的认证页面。

请求 GET /openid/:id/connect

登出

请求 POST /auth/logout

锁定

请求 POST /auth/lock

使用 TOTP 解锁

请求 POST /do-auth/totp
请求主体 application/json ({ code: string })
响应主体 application/json (LoginResponse)

发送一次性验证码

请求 POST /auth/motp/request
参数 { endpoint: number }
请求主体 application/json ({ captcha: string })
响应主体 application/json ({})

使用一次性验证码解锁

请求 POST /do-auth/motp
请求主体 application/json ({ code: string })
响应主体 application/json (LoginResponse)

获取解锁方式

请求 GET /auth/unlock
响应主体 application/json (DataResponse<{ mode: string }>)