mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 23:06:36 +08:00
feat(auth): implement decoupled sliding-window rate limiting for login and oauth
This commit is contained in:
+16
-3
@@ -5702,7 +5702,7 @@ const docTemplate = `{
|
||||
},
|
||||
"/api/v1/user/login": {
|
||||
"post": {
|
||||
"description": "使用用户名和密码登录,登录成功后建立 Session。若管理员已关闭密码登录功能则返回错误。",
|
||||
"description": "使用用户名和密码登录系统,验证通过后建立 Session 并返回用户信息。",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -5712,7 +5712,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"user"
|
||||
],
|
||||
"summary": "用户密码登录",
|
||||
"summary": "用户登录",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "登录请求参数",
|
||||
@@ -5737,6 +5737,12 @@ const docTemplate = `{
|
||||
"$ref": "#/definitions/response.Any"
|
||||
}
|
||||
},
|
||||
"429": {
|
||||
"description": "登录尝试过于频繁",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Any"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "服务内部错误",
|
||||
"schema": {
|
||||
@@ -5872,6 +5878,12 @@ const docTemplate = `{
|
||||
"$ref": "#/definitions/response.Any"
|
||||
}
|
||||
},
|
||||
"429": {
|
||||
"description": "注册尝试过于频繁",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Any"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "服务内部错误",
|
||||
"schema": {
|
||||
@@ -6081,7 +6093,8 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
"type": "string",
|
||||
"example": "0"
|
||||
},
|
||||
"is_admin": {
|
||||
"type": "boolean"
|
||||
|
||||
Reference in New Issue
Block a user