api_data.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. define({ "api": [
  2. {
  3. "type": "DESC",
  4. "url": "App测试说明",
  5. "title": "",
  6. "name": "App测试说明",
  7. "group": "1.License(描述)",
  8. "description": "<p>License组件App测试说明</p>",
  9. "parameter": {
  10. "examples": [
  11. {
  12. "title": "说明:",
  13. "content": " \n- > ### 测试证书生成(Creator)\n\n配置文件启用creator模式配置且pom.xml文件引入license-creator-spring-boot-starter包\n\nspring.profiles.active = creator\n\n<dependency>\n <groupId>com.appleyk.spring.boot</groupId>\n <artifactId>license-creator-spring-boot-starter</artifactId>\n <version>0.2.1-SNAPSHOT</version>\n</dependency>\n\n详细配置请查看application-creator.properties文件\n\n\n- > ### 测试证书验证(Verify)\n\n配置文件启用creator模式配置且pom.xml文件引入license-verify-spring-boot-starter包\n\nspring.profiles.active = verify\n\n<dependency>\n <groupId>com.appleyk.spring.boot</groupId>\n <artifactId>license-verify-spring-boot-starter</artifactId>\n <version>0.2.1-SNAPSHOT</version>\n</dependency>\n\n详细配置请查看application-verify.properties文件",
  14. "type": "html"
  15. }
  16. ]
  17. },
  18. "version": "0.0.0",
  19. "filename": "src/service.java",
  20. "groupTitle": "1.License(描述)"
  21. },
  22. {
  23. "type": "DESC",
  24. "url": "自定义属性验证使用说明",
  25. "title": "",
  26. "name": "自定义属性验证使用说明",
  27. "group": "1.License(描述)",
  28. "description": "<p>License组件自定义属性验证说明</p>",
  29. "parameter": {
  30. "examples": [
  31. {
  32. "title": "说明:",
  33. "content": "使用License组件自定义属性验证功能需要继承AGxCustomVerifyListener类,\n并且实现verify方法,使用@Component注解,验证成功需要返回true\n\npublic abstract boolean verify(LicenseExtraParam licenseExtra) throws Exception;\n\n详细可参考TestACustomVerifyListener文件示例",
  34. "type": "html"
  35. }
  36. ]
  37. },
  38. "version": "0.0.0",
  39. "filename": "src/service.java",
  40. "groupTitle": "1.License(描述)"
  41. },
  42. {
  43. "type": "DESC",
  44. "url": "证书认证模块使用说明",
  45. "title": "",
  46. "name": "证书认证模块使用说明",
  47. "group": "1.License(描述)",
  48. "description": "<p>License认证模块使用说明</p>",
  49. "parameter": {
  50. "examples": [
  51. {
  52. "title": "说明:",
  53. "content": "使用证书验证,需要增加license-verify-spring-boot-starter模块依赖,在需要证书验证的接口上\n增加@VLicense注解,模块系统中需要增加相应的证书配置,验证模块中需要放公钥和证书文件",
  54. "type": "text"
  55. }
  56. ]
  57. },
  58. "version": "0.0.0",
  59. "filename": "src/service.java",
  60. "groupTitle": "1.License(描述)"
  61. },
  62. {
  63. "type": "GET",
  64. "url": "/license/download",
  65. "title": "3 下载许可证书",
  66. "name": "download",
  67. "group": "2.License_(接口)",
  68. "version": "v0.2.1",
  69. "parameter": {
  70. "fields": {
  71. "Parameter": [
  72. {
  73. "group": "Parameter",
  74. "type": "String",
  75. "optional": false,
  76. "field": "path",
  77. "description": "<p>证书所在路径</p>"
  78. }
  79. ]
  80. },
  81. "examples": [
  82. {
  83. "title": "下载证书:",
  84. "content": "http://127.0.0.1:8081/license/download?path=/home/license/20200509134009/license.lic",
  85. "type": "json"
  86. }
  87. ]
  88. },
  89. "description": "<p>可以直接调用该接口,也可以直接通过证书生成返回的licUrl信息,将其复制到浏览器中进行下载</p>",
  90. "filename": "src/service.java",
  91. "groupTitle": "2.License_(接口)"
  92. },
  93. {
  94. "type": "POST",
  95. "url": "/license/generate",
  96. "title": "2 生成许可证书",
  97. "name": "generate",
  98. "group": "2.License_(接口)",
  99. "description": "<p>开发或市场人员通过填写业务系统软件许可证书的注册信息,来生成相应的lic;注册成功后,可将返回结果中的licUrl的地址,复制到浏览器中进行下载, 即将服务器生成好的软件许可证书liccense.lic文件下载到本地</p>",
  100. "parameter": {
  101. "fields": {
  102. "Parameter": [
  103. {
  104. "group": "Parameter",
  105. "type": "String",
  106. "optional": false,
  107. "field": "subject",
  108. "description": "<p>证书名称,非空</p>"
  109. },
  110. {
  111. "group": "Parameter",
  112. "type": "String",
  113. "optional": false,
  114. "field": "privateAlias",
  115. "description": "<p>私钥别名,非空</p>"
  116. },
  117. {
  118. "group": "Parameter",
  119. "type": "String",
  120. "optional": false,
  121. "field": "keyPass",
  122. "description": "<p>私钥密码,非空</p>"
  123. },
  124. {
  125. "group": "Parameter",
  126. "type": "String",
  127. "optional": false,
  128. "field": "storePass",
  129. "description": "<p>私钥库密码,非空</p>"
  130. },
  131. {
  132. "group": "Parameter",
  133. "type": "String",
  134. "optional": false,
  135. "field": "licensePath",
  136. "description": "<p>证书生成地址,非空</p>"
  137. },
  138. {
  139. "group": "Parameter",
  140. "type": "String",
  141. "optional": false,
  142. "field": "issuedTime",
  143. "description": "<p>授权日期,非空</p>"
  144. },
  145. {
  146. "group": "Parameter",
  147. "type": "String",
  148. "optional": false,
  149. "field": "expiryTime",
  150. "description": "<p>证书失效日期,非空</p>"
  151. },
  152. {
  153. "group": "Parameter",
  154. "type": "String",
  155. "optional": false,
  156. "field": "consumerType",
  157. "description": "<p>授权用户类型(默认1)</p>"
  158. },
  159. {
  160. "group": "Parameter",
  161. "type": "String",
  162. "optional": false,
  163. "field": "consumerAmount",
  164. "description": "<p>授权用户数量</p>"
  165. },
  166. {
  167. "group": "Parameter",
  168. "type": "String",
  169. "optional": false,
  170. "field": "description",
  171. "description": "<p>证书描述信息</p>"
  172. },
  173. {
  174. "group": "Parameter",
  175. "type": "Object",
  176. "optional": false,
  177. "field": "licenseCheck",
  178. "description": "<p>证书额外验证信息对象</p>"
  179. },
  180. {
  181. "group": "Parameter",
  182. "type": "bool",
  183. "optional": false,
  184. "field": "licenseCheck.ipCheck",
  185. "description": "<p>是否验证ip地址列表,非空</p>"
  186. },
  187. {
  188. "group": "Parameter",
  189. "type": "List",
  190. "optional": false,
  191. "field": "licenseCheck.ipAddress",
  192. "description": "<p>可被允许的ip地址列表</p>"
  193. },
  194. {
  195. "group": "Parameter",
  196. "type": "bool",
  197. "optional": false,
  198. "field": "licenseCheck.macCheck",
  199. "description": "<p>是否验证mac地址列表</p>"
  200. },
  201. {
  202. "group": "Parameter",
  203. "type": "List",
  204. "optional": false,
  205. "field": "licenseCheck.macAddress",
  206. "description": "<p>可被允许的mac地址列表</p>"
  207. },
  208. {
  209. "group": "Parameter",
  210. "type": "bool",
  211. "optional": false,
  212. "field": "licenseCheck.isCpuCheck",
  213. "description": "<p>是否验证cpu序列号</p>"
  214. },
  215. {
  216. "group": "Parameter",
  217. "type": "String",
  218. "optional": false,
  219. "field": "licenseCheck.cpuSerial",
  220. "description": "<p>可被允许的cpu序列号</p>"
  221. },
  222. {
  223. "group": "Parameter",
  224. "type": "bool",
  225. "optional": false,
  226. "field": "licenseCheck.isBoardCheck",
  227. "description": "<p>是否验证主板号</p>"
  228. },
  229. {
  230. "group": "Parameter",
  231. "type": "String",
  232. "optional": false,
  233. "field": "licenseCheck.mainBoardSerial",
  234. "description": "<p>可被允许的主板序列号</p>"
  235. },
  236. {
  237. "group": "Parameter",
  238. "type": "bool",
  239. "optional": false,
  240. "field": "licenseCheck.registerCheck",
  241. "description": "<p>是否验证注册人数</p>"
  242. },
  243. {
  244. "group": "Parameter",
  245. "type": "List",
  246. "optional": false,
  247. "field": "licenseCheck.registerAmount",
  248. "description": "<p>可被允许的最大注册人数限制</p>"
  249. },
  250. {
  251. "group": "Parameter",
  252. "type": "String",
  253. "optional": false,
  254. "field": "licUrl",
  255. "description": "<p>许可证书的(服务器)下载地址</p>"
  256. }
  257. ]
  258. },
  259. "examples": [
  260. {
  261. "title": "生成许可证书:",
  262. "content": "/license/generate",
  263. "type": "json"
  264. },
  265. {
  266. "title": "params-Json:",
  267. "content": " {\n \"subject\": \"landi\",\n \"privateAlias\": \"privateKeys\",\n \"keyPass\": \"123456a\",\n \"storePass\": \"123456a\",\n \"privateKeysStorePath\": \"/privateKeys.store\",\n \"issuedTime\": \"2020-05-01 08:30:00\",\n \"expiryTime\": \"2021-05-01 08:30:00\",\n \"description\": \"系统软件许可证书\",\n \"licenseCheck\": {\n \"ipAddress\": [\n \"192.168.1.2\",\n \"2408:8221:1d:bbd0:ad77:446e:4904:a776\",\n \"2408:8221:1d:bbd0:71b6:d1b0:39c6:3c4e\",\n \"192.168.145.1\",\n \"192.168.239.1\"\n ],\n \"macAddress\": [\n \"64-FB-81-6F-0E-C2\",\n \"00-50-56-C0-00-08\",\n \"00-50-56-C0-00-01\"\n ],\n \"cpuSerial\": \"BFEBFBFF000206D7\",\n \"mainBoardSerial\": \"MB-201706282017\",\n \"registerAmount\": 1000,\n \"macCheck\": false,\n \"boardCheck\": false,\n \"cpuCheck\": false,\n \"ipCheck\": false,\n \"registerCheck\": true\n }\n}",
  268. "type": "json"
  269. }
  270. ]
  271. },
  272. "version": "v0.2.1",
  273. "success": {
  274. "examples": [
  275. {
  276. "title": "Success-Response:",
  277. "content": " {\n \"status\": 200,\n \"message\": \"证书生成成功,证书有效期:2020-05-01 08:30:00 - 2021-05-01 08:30:00\",\n \"data\": {\n \"subject\": \"landi\",\n \"privateAlias\": \"privateKeys\",\n \"keyPass\": \"123456a\",\n \"storePass\": \"123456a\",\n \"licensePath\": \"/data/license/20200509134009/license.lic\",\n \"privateKeysStorePath\": \"/privateKeys.store\",\n \"issuedTime\": \"2020-05-01 08:30:00\",\n \"expiryTime\": \"2021-05-01 08:30:00\",\n \"consumerType\": \"user\",\n \"consumerAmount\": 1,\n \"description\": \"系统软件许可证书\",\n \"licenseCheck\": {\n \"ipAddress\": [\n \"192.168.1.2\",\n \"2408:8221:1d:bbd0:ad77:446e:4904:a776\",\n \"2408:8221:1d:bbd0:71b6:d1b0:39c6:3c4e\",\n \"192.168.145.1\",\n \"192.168.239.1\"\n ],\n \"macAddress\": [\n \"64-FB-81-6F-0E-C2\",\n \"00-50-56-C0-00-08\",\n \"00-50-56-C0-00-01\"\n ],\n \"cpuSerial\": \"BFEBFBFF000206D7\",\n \"mainBoardSerial\": \"MB-201706282017\",\n \"registerAmount\": 1000,\n \"registerCheck\": true,\n \"cpuCheck\": false,\n \"boardCheck\": false,\n \"ipCheck\": false,\n \"macCheck\": false\n },\n \"licUrl\": \"http://127.0.0.1:8081/license/download?path=/data/license/20200509134009/license.lic\"\n },\n \"timestamp\": \"2020-08-22 12:51:09\"\n}",
  278. "type": "json"
  279. }
  280. ]
  281. },
  282. "filename": "src/service.java",
  283. "groupTitle": "2.License_(接口)"
  284. },
  285. {
  286. "type": "GET",
  287. "url": "/license/getServerInfos",
  288. "title": "1 获取硬件信息",
  289. "name": "getServerInfos",
  290. "group": "2.License_(接口)",
  291. "version": "v0.2.1",
  292. "description": "<p>部署人员通过该接口,可以获取到系统所在的部署目标服务器(集群)的硬件信息,通过将该信息提供给开发或市场人员,可以由开发或市场人员根据实际情况进行相应的lic的注册</p>",
  293. "parameter": {
  294. "fields": {
  295. "Parameter": [
  296. {
  297. "group": "Parameter",
  298. "type": "String",
  299. "optional": false,
  300. "field": "osName",
  301. "description": "<p>系统类型(选填,不填的话,程序字段获取)</p>"
  302. }
  303. ]
  304. },
  305. "examples": [
  306. {
  307. "title": "获取硬件信息:",
  308. "content": "/license/getServerInfos",
  309. "type": "json"
  310. },
  311. {
  312. "title": "params-Json:",
  313. "content": "{\n \"osName\": \"linux\"\n}",
  314. "type": "json"
  315. }
  316. ]
  317. },
  318. "success": {
  319. "examples": [
  320. {
  321. "title": "Success-Response:",
  322. "content": " {\n \"status\": 200,\n \"message\": \"成功\",\n \"data\": {\n \"ipAddress\": [\n \"192.168.1.103\"\n ],\n \"macAddress\": [\n \"00-50-56-BD-54-BE\"\n ],\n \"cpuSerial\": \"564d90d1-baff-8747-80ef-1c32318df424\",\n \"mainBoardSerial\": \"Not\",\n \"registerAmount\": null,\n \"registerCheck\": false,\n \"cpuCheck\": false,\n \"boardCheck\": false,\n \"ipCheck\": false,\n \"macCheck\": false\n },\n \"timestamp\": \"2020-08-22 12:53:34\"\n}",
  323. "type": "json"
  324. }
  325. ]
  326. },
  327. "filename": "src/service.java",
  328. "groupTitle": "2.License_(接口)"
  329. }
  330. ] });