|
|
definitions:
|
|
|
Model.AppInfo:
|
|
|
properties:
|
|
|
app_key:
|
|
|
type: string
|
|
|
app_name:
|
|
|
type: string
|
|
|
app_secret:
|
|
|
type: string
|
|
|
code:
|
|
|
type: integer
|
|
|
msg:
|
|
|
type: string
|
|
|
redirect_uri:
|
|
|
type: string
|
|
|
type: object
|
|
|
Model.Res:
|
|
|
properties:
|
|
|
code:
|
|
|
description: omitempty有值就输出,没值则不输出
|
|
|
type: object
|
|
|
data:
|
|
|
description: omitempty有值就输出,没值则不输出
|
|
|
type: object
|
|
|
items:
|
|
|
description: omitempty有值就输出,没值则不输出
|
|
|
type: object
|
|
|
msg:
|
|
|
description: omitempty有值就输出,没值则不输出
|
|
|
type: object
|
|
|
total_count:
|
|
|
description: 个数
|
|
|
type: object
|
|
|
type: object
|
|
|
host: 127.0.0.1:8000
|
|
|
info:
|
|
|
contact: {}
|
|
|
description: 参考自xxl-sso
|
|
|
license: {}
|
|
|
title: 东师理想统一认证中心(OAuth2+Sso)
|
|
|
version: "2.0"
|
|
|
paths:
|
|
|
/oauth2/access_token:
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 获取access_token
|
|
|
parameters:
|
|
|
- description: code
|
|
|
in: query
|
|
|
name: code
|
|
|
type: string
|
|
|
- description: refresh_token
|
|
|
in: query
|
|
|
name: refresh_token
|
|
|
type: string
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
type: string
|
|
|
summary: 获取access_token
|
|
|
tags:
|
|
|
- 登录验证类
|
|
|
/oauth2/authorize:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 登录验证跳转路由
|
|
|
parameters:
|
|
|
- description: client_id
|
|
|
in: query
|
|
|
name: client_id
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: redirect_uri
|
|
|
in: query
|
|
|
name: redirect_uri
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: device_id
|
|
|
in: query
|
|
|
name: device_id
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 第三方系统回跳的页面地址
|
|
|
in: query
|
|
|
name: oauth_callback
|
|
|
required: true
|
|
|
type: string
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
type: string
|
|
|
summary: 登录验证跳转路由
|
|
|
tags:
|
|
|
- 登录验证类
|
|
|
x-emptylimit:
|
|
|
- client_id
|
|
|
- redirect_uri
|
|
|
- device_id
|
|
|
- oauth_callback
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 验证post
|
|
|
parameters:
|
|
|
- description: 验证码id
|
|
|
in: formData
|
|
|
name: captchaId
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 验证码值
|
|
|
in: formData
|
|
|
name: value
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 用户名
|
|
|
in: formData
|
|
|
name: username
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 密码
|
|
|
in: formData
|
|
|
name: password
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 设备ID
|
|
|
in: formData
|
|
|
name: device_id
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 第三方系统的接口回调地址
|
|
|
in: formData
|
|
|
name: redirect_uri
|
|
|
type: string
|
|
|
- description: 第三方系统的ID
|
|
|
in: formData
|
|
|
name: client_id
|
|
|
type: string
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
$ref: '#/definitions/Model.Res'
|
|
|
summary: 验证post
|
|
|
tags:
|
|
|
- 登录验证类
|
|
|
x-emptylimit:
|
|
|
- username
|
|
|
- password
|
|
|
- captchaId
|
|
|
- value
|
|
|
x-intlimit:
|
|
|
- device_id
|
|
|
/oauth2/bindWxUser:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 绑定微信用户
|
|
|
parameters:
|
|
|
- description: username
|
|
|
in: formData
|
|
|
name: username
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: password
|
|
|
in: formData
|
|
|
name: password
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: openId
|
|
|
in: formData
|
|
|
name: openId
|
|
|
required: true
|
|
|
type: string
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
type: string
|
|
|
summary: 绑定微信用户
|
|
|
tags:
|
|
|
- 登录验证类
|
|
|
/oauth2/checkOpenId:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 检查OPENID的是否已经绑定
|
|
|
parameters:
|
|
|
- description: OpenId
|
|
|
in: query
|
|
|
name: openid
|
|
|
required: true
|
|
|
type: string
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
type: string
|
|
|
summary: 检查OPENID的是否已经绑定
|
|
|
tags:
|
|
|
- 登录验证类
|
|
|
/oauth2/getCaptcha:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 获取验证码(为了以后WEB服务器的集群扩展,将验证码保存到redis中,避免ip_hash)
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
$ref: '#/definitions/Model.Res'
|
|
|
summary: 获取验证码
|
|
|
tags:
|
|
|
- 登录验证类
|
|
|
/oauth2/getCaptchaPng:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 获取验证码图片
|
|
|
parameters:
|
|
|
- description: captchaId
|
|
|
in: query
|
|
|
name: captchaId
|
|
|
required: true
|
|
|
type: string
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
type: string
|
|
|
summary: 获取验证码图片
|
|
|
tags:
|
|
|
- 登录验证类
|
|
|
x-lengthlimit:
|
|
|
- captchaId: 20,20
|
|
|
/oauth2/logout:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 退出统一认证
|
|
|
parameters:
|
|
|
- description: redirect_uri
|
|
|
in: query
|
|
|
name: redirect_uri
|
|
|
required: true
|
|
|
type: string
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
type: string
|
|
|
summary: 退出统一认证
|
|
|
tags:
|
|
|
- 登录验证类
|
|
|
/oauth2/resetRemainCount:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 重置错误重试次数限制
|
|
|
parameters:
|
|
|
- description: 登录用的用户名
|
|
|
in: query
|
|
|
name: userName
|
|
|
required: true
|
|
|
type: string
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
type: string
|
|
|
summary: 重置错误重试次数限制
|
|
|
tags:
|
|
|
- 登录验证类
|
|
|
x-emptylimit:
|
|
|
- userName
|
|
|
/oauth2/unBindWxUser:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 绑定微信用户
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
type: string
|
|
|
summary: 解除绑定微信用户
|
|
|
tags:
|
|
|
- 解除登录验证类
|
|
|
/oauth2/wxLogin:
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 微信登录
|
|
|
parameters:
|
|
|
- description: 腾讯返回的code码
|
|
|
in: formData
|
|
|
name: code
|
|
|
required: true
|
|
|
type: string
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
type: string
|
|
|
summary: 微信登录
|
|
|
tags:
|
|
|
- 登录验证类
|
|
|
x-emptylimit:
|
|
|
- code
|
|
|
/sso/getAppInfoById:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 根据appId获取接入第三方统一认证系统的信息
|
|
|
parameters:
|
|
|
- description: 系统app_id
|
|
|
in: query
|
|
|
name: app_id
|
|
|
required: true
|
|
|
type: string
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
$ref: '#/definitions/Model.AppInfo'
|
|
|
summary: 根据appId获取接入第三方统一认证系统的信息
|
|
|
tags:
|
|
|
- 接入系统维护类
|
|
|
x-intlimit:
|
|
|
- app_id
|
|
|
/sso/login:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: manager dsideal4r5t6y7u 为统一认证管理员默认帐号
|
|
|
produces:
|
|
|
- application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
description: OK
|
|
|
schema:
|
|
|
type: string
|
|
|
summary: 接入系统管理中心维护的路由跳转
|
|
|
tags:
|
|
|
- 接入系统维护类
|
|
|
swagger: "2.0"
|