add remove user token #34
This commit is contained in:
@@ -1485,7 +1485,7 @@ const docTemplateadmin = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/loginLog/delete": {
|
||||
"/admin/login_log/delete": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
@@ -1530,7 +1530,7 @@ const docTemplateadmin = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/loginLog/detail/{id}": {
|
||||
"/admin/login_log/detail/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -1585,7 +1585,7 @@ const docTemplateadmin = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/loginLog/list": {
|
||||
"/admin/login_log/list": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -2216,6 +2216,12 @@ const docTemplateadmin = `{
|
||||
"description": "主机名",
|
||||
"name": "hostname",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "uuids 用逗号分隔",
|
||||
"name": "uuids",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -3087,6 +3093,117 @@ const docTemplateadmin = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/user_token/delete": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"token": []
|
||||
}
|
||||
],
|
||||
"description": "登录凭证删除",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"登录凭证"
|
||||
],
|
||||
"summary": "登录凭证删除",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "登录凭证信息",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/model.UserToken"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/user_token/list": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"token": []
|
||||
}
|
||||
],
|
||||
"description": "登录凭证列表",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"登录凭证"
|
||||
],
|
||||
"summary": "登录凭证列表",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "页码",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "页大小",
|
||||
"name": "page_size",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "用户ID",
|
||||
"name": "user_id",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/response.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/model.UserTokenList"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -3801,6 +3918,9 @@ const docTemplateadmin = `{
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_token_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"uuid": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -4068,6 +4188,49 @@ const docTemplateadmin = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.UserToken": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"expired_at": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"token": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.UserTokenList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.UserToken"
|
||||
}
|
||||
},
|
||||
"page": {
|
||||
"type": "integer"
|
||||
},
|
||||
"page_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -1478,7 +1478,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/loginLog/delete": {
|
||||
"/admin/login_log/delete": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
@@ -1523,7 +1523,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/loginLog/detail/{id}": {
|
||||
"/admin/login_log/detail/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -1578,7 +1578,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/loginLog/list": {
|
||||
"/admin/login_log/list": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -2209,6 +2209,12 @@
|
||||
"description": "主机名",
|
||||
"name": "hostname",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "uuids 用逗号分隔",
|
||||
"name": "uuids",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -3080,6 +3086,117 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/user_token/delete": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"token": []
|
||||
}
|
||||
],
|
||||
"description": "登录凭证删除",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"登录凭证"
|
||||
],
|
||||
"summary": "登录凭证删除",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "登录凭证信息",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/model.UserToken"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/user_token/list": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"token": []
|
||||
}
|
||||
],
|
||||
"description": "登录凭证列表",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"登录凭证"
|
||||
],
|
||||
"summary": "登录凭证列表",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "页码",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "页大小",
|
||||
"name": "page_size",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "用户ID",
|
||||
"name": "user_id",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/response.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/model.UserTokenList"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -3794,6 +3911,9 @@
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_token_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"uuid": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -4061,6 +4181,49 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.UserToken": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"expired_at": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"token": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.UserTokenList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.UserToken"
|
||||
}
|
||||
},
|
||||
"page": {
|
||||
"type": "integer"
|
||||
},
|
||||
"page_size": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -476,6 +476,8 @@ definitions:
|
||||
type: string
|
||||
user_id:
|
||||
type: integer
|
||||
user_token_id:
|
||||
type: integer
|
||||
uuid:
|
||||
type: string
|
||||
type: object
|
||||
@@ -653,6 +655,34 @@ definitions:
|
||||
total:
|
||||
type: integer
|
||||
type: object
|
||||
model.UserToken:
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
expired_at:
|
||||
type: integer
|
||||
id:
|
||||
type: integer
|
||||
token:
|
||||
type: string
|
||||
updated_at:
|
||||
type: string
|
||||
user_id:
|
||||
type: integer
|
||||
type: object
|
||||
model.UserTokenList:
|
||||
properties:
|
||||
list:
|
||||
items:
|
||||
$ref: '#/definitions/model.UserToken'
|
||||
type: array
|
||||
page:
|
||||
type: integer
|
||||
page_size:
|
||||
type: integer
|
||||
total:
|
||||
type: integer
|
||||
type: object
|
||||
response.ErrorResponse:
|
||||
properties:
|
||||
error:
|
||||
@@ -1546,7 +1576,7 @@ paths:
|
||||
summary: 登录选项
|
||||
tags:
|
||||
- 登录
|
||||
/admin/loginLog/delete:
|
||||
/admin/login_log/delete:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1574,7 +1604,7 @@ paths:
|
||||
summary: 登录日志删除
|
||||
tags:
|
||||
- 登录日志
|
||||
/admin/loginLog/detail/{id}:
|
||||
/admin/login_log/detail/{id}:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1606,7 +1636,7 @@ paths:
|
||||
summary: 登录日志详情
|
||||
tags:
|
||||
- 登录日志
|
||||
/admin/loginLog/list:
|
||||
/admin/login_log/list:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1979,6 +2009,10 @@ paths:
|
||||
in: query
|
||||
name: hostname
|
||||
type: string
|
||||
- description: uuids 用逗号分隔
|
||||
in: query
|
||||
name: uuids
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -2498,6 +2532,73 @@ paths:
|
||||
summary: 修改密码
|
||||
tags:
|
||||
- 用户
|
||||
/admin/user_token/delete:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 登录凭证删除
|
||||
parameters:
|
||||
- description: 登录凭证信息
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/model.UserToken'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
security:
|
||||
- token: []
|
||||
summary: 登录凭证删除
|
||||
tags:
|
||||
- 登录凭证
|
||||
/admin/user_token/list:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 登录凭证列表
|
||||
parameters:
|
||||
- description: 页码
|
||||
in: query
|
||||
name: page
|
||||
type: integer
|
||||
- description: 页大小
|
||||
in: query
|
||||
name: page_size
|
||||
type: integer
|
||||
- description: 用户ID
|
||||
in: query
|
||||
name: user_id
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/response.Response'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/model.UserTokenList'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/response.Response'
|
||||
security:
|
||||
- token: []
|
||||
summary: 登录凭证列表
|
||||
tags:
|
||||
- 登录凭证
|
||||
securityDefinitions:
|
||||
BearerAuth:
|
||||
in: header
|
||||
|
||||
Reference in New Issue
Block a user