auth.swagger.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "title": "auth.proto",
  5. "version": "version not set"
  6. },
  7. "schemes": [
  8. "http",
  9. "https"
  10. ],
  11. "consumes": [
  12. "application/json"
  13. ],
  14. "produces": [
  15. "application/json"
  16. ],
  17. "paths": {
  18. "/v1/auth/authenticate": {
  19. "post": {
  20. "operationId": "Authenticate",
  21. "responses": {
  22. "200": {
  23. "description": "",
  24. "schema": {
  25. "$ref": "#/definitions/pbAuthAuthenticateResponse"
  26. }
  27. }
  28. },
  29. "parameters": [
  30. {
  31. "name": "body",
  32. "in": "body",
  33. "required": true,
  34. "schema": {
  35. "$ref": "#/definitions/pbAuthAuthenticateRequest"
  36. }
  37. }
  38. ],
  39. "tags": [
  40. "AuthService"
  41. ]
  42. }
  43. },
  44. "/v1/auth/status": {
  45. "get": {
  46. "operationId": "Status",
  47. "responses": {
  48. "200": {
  49. "description": "",
  50. "schema": {
  51. "$ref": "#/definitions/pbAuthStatusResponse"
  52. }
  53. }
  54. },
  55. "tags": [
  56. "AuthService"
  57. ]
  58. }
  59. }
  60. },
  61. "definitions": {
  62. "UserResponseUser": {
  63. "type": "object",
  64. "properties": {
  65. "username": {
  66. "type": "string"
  67. },
  68. "server_serial_number": {
  69. "type": "string"
  70. },
  71. "cert": {
  72. "type": "string"
  73. },
  74. "created_at": {
  75. "type": "string"
  76. },
  77. "ip_net": {
  78. "type": "string"
  79. },
  80. "no_gw": {
  81. "type": "boolean",
  82. "format": "boolean"
  83. },
  84. "host_id": {
  85. "type": "integer",
  86. "format": "int64"
  87. },
  88. "is_admin": {
  89. "type": "boolean",
  90. "format": "boolean"
  91. }
  92. }
  93. },
  94. "pbAuthAuthenticateRequest": {
  95. "type": "object",
  96. "properties": {
  97. "username": {
  98. "type": "string"
  99. },
  100. "password": {
  101. "type": "string"
  102. }
  103. }
  104. },
  105. "pbAuthAuthenticateResponse": {
  106. "type": "object",
  107. "properties": {
  108. "token": {
  109. "type": "string"
  110. }
  111. }
  112. },
  113. "pbAuthStatusResponse": {
  114. "type": "object",
  115. "properties": {
  116. "user": {
  117. "$ref": "#/definitions/UserResponseUser"
  118. }
  119. }
  120. }
  121. }
  122. }