{ "swagger": "2.0", "info": { "description": "参考自xxl-sso", "title": "东师理想统一认证中心(OAuth2+Sso)", "contact": {}, "license": {}, "version": "2.0" }, "host": "10.10.14.187:8000", "paths": { "/oauth2/access_token": { "post": { "description": "获取access_token", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "登录验证类" ], "summary": "获取access_token", "parameters": [ { "type": "string", "description": "code", "name": "code", "in": "query" }, { "type": "string", "description": "refresh_token", "name": "refresh_token", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } } } } }, "/oauth2/authorize": { "get": { "description": "登录验证跳转路由", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "登录验证类" ], "summary": "登录验证跳转路由", "parameters": [ { "type": "string", "description": "client_id", "name": "client_id", "in": "query", "required": true }, { "type": "string", "description": "redirect_uri", "name": "redirect_uri", "in": "query", "required": true }, { "type": "string", "description": "device_id", "name": "device_id", "in": "query", "required": true }, { "type": "string", "description": "第三方系统回跳的页面地址", "name": "oauth_callback", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } } }, "x-emptylimit": [ "client_id", "redirect_uri", "device_id", "oauth_callback" ] }, "post": { "description": "验证post", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "登录验证类" ], "summary": "验证post", "parameters": [ { "type": "string", "description": "验证码id", "name": "captchaId", "in": "formData", "required": true }, { "type": "string", "description": "验证码值", "name": "value", "in": "formData", "required": true }, { "type": "string", "description": "用户名", "name": "username", "in": "formData", "required": true }, { "type": "string", "description": "密码", "name": "password", "in": "formData", "required": true }, { "type": "string", "description": "设备ID", "name": "device_id", "in": "formData", "required": true }, { "type": "string", "description": "第三方系统的接口回调地址", "name": "redirect_uri", "in": "formData" }, { "type": "string", "description": "第三方系统的ID", "name": "client_id", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Model.Res" } } }, "x-emptylimit": [ "username", "password", "captchaId", "value" ], "x-intlimit": [ "device_id" ] } }, "/oauth2/getCaptcha": { "get": { "description": "获取验证码(为了以后WEB服务器的集群扩展,将验证码保存到redis中,避免ip_hash)", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "登录验证类" ], "summary": "获取验证码", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Model.Res" } } } } }, "/oauth2/getCaptchaPng": { "get": { "description": "获取验证码图片", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "登录验证类" ], "summary": "获取验证码图片", "parameters": [ { "type": "string", "description": "captchaId", "name": "captchaId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } } }, "x-lengthlimit": [ { "captchaId": "20,20" } ] } }, "/oauth2/logout": { "get": { "description": "退出统一认证", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "登录验证类" ], "summary": "退出统一认证", "parameters": [ { "type": "string", "description": "redirect_uri", "name": "redirect_uri", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } } } } }, "/oauth2/resetRemainCount": { "get": { "description": "重置错误重试次数限制", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "登录验证类" ], "summary": "重置错误重试次数限制", "parameters": [ { "type": "string", "description": "登录用的用户名", "name": "userName", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } } }, "x-emptylimit": [ "userName" ] } }, "/sso/addJoinApp": { "post": { "description": "增加一条接入系统的记录", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "接入系统维护类" ], "summary": "增加一条接入系统的记录", "parameters": [ { "type": "string", "description": "系统名称", "name": "app_name", "in": "formData", "required": true }, { "type": "string", "description": "回调的地址", "name": "redirect_uri", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Model.Res" } } }, "x-lengthlimit": [ { "app_name": "1,30" }, { "redirect_uri_1": "8,100" }, { "redirect_uri_2": "8,100" } ] } }, "/sso/deleteJoinAppById": { "post": { "description": "删除一条统一认证系统的记录", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "接入系统维护类" ], "summary": "删除一条统一认证系统的记录", "parameters": [ { "type": "string", "description": "系统app_id", "name": "app_id", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Model.Res" } } }, "x-intlimit": [ "app_id" ] } }, "/sso/getJoinAppInfoById": { "get": { "description": "根据appId获取接入第三方统一认证系统的信息", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "接入系统维护类" ], "summary": "根据appId获取接入第三方统一认证系统的信息", "parameters": [ { "type": "string", "description": "系统app_id", "name": "app_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Model.AppInfo" } } }, "x-intlimit": [ "app_id" ] } }, "/sso/getJoinAppList": { "get": { "description": "获取接入系统的列表", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "接入系统维护类" ], "summary": "获取接入系统的列表", "parameters": [ { "type": "integer", "description": "每页多少条数据", "name": "limit", "in": "query", "required": true }, { "type": "integer", "description": "显示第几页", "name": "page", "in": "query", "required": true }, { "type": "string", "description": "搜索的关键词", "name": "keyword", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Model.Res" } } }, "x-intlimit": [ "limit", "page" ], "x-lengthlimit": [ { "keyword": "0,20" } ] } }, "/sso/login": { "get": { "description": "manager dsideal4r5t6y7u 为统一认证管理员默认帐号", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "接入系统维护类" ], "summary": "接入系统管理中心维护的路由跳转", "responses": { "200": { "description": "OK", "schema": { "type": "string" } } } } }, "/sso/updateJoinApp": { "post": { "description": "修改一条接入系统的记录", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ "接入系统维护类" ], "summary": "修改一条接入系统的记录", "parameters": [ { "type": "string", "description": "系统app_id", "name": "app_id", "in": "formData" }, { "type": "string", "description": "系统名称", "name": "app_name", "in": "formData", "required": true }, { "type": "string", "description": "回调的地址", "name": "redirect_uri", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Model.Res" } } }, "x-intlimit": [ "app_id" ], "x-lengthlimit": [ { "app_name": "1,30" }, { "redirect_uri_1": "8,100" }, { "redirect_uri_2": "8,100" } ] } } }, "definitions": { "Model.AppInfo": { "type": "object", "properties": { "app_key": { "type": "string" }, "app_name": { "type": "string" }, "app_secret": { "type": "string" }, "code": { "type": "integer" }, "msg": { "type": "string" }, "redirect_uri": { "type": "string" } } }, "Model.Res": { "type": "object", "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" } } } } }