auth.yaml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. Login:
  2. post:
  3. operationId: login
  4. summary: 用户登录
  5. security: []
  6. parameters:
  7. - $ref: '../components/parameters.yaml#/XRequestId'
  8. requestBody:
  9. required: true
  10. content:
  11. application/json:
  12. schema:
  13. $ref: '../components/schemas.yaml#/LoginRequest'
  14. responses:
  15. '200':
  16. description: 登录成功
  17. content:
  18. application/json:
  19. schema:
  20. $ref: '../components/schemas.yaml#/LoginResponse'
  21. '400':
  22. $ref: '../components/responses.yaml#/InvalidArgument'
  23. '401':
  24. $ref: '../components/responses.yaml#/AuthenticationError'
  25. '403':
  26. $ref: '../components/responses.yaml#/Forbidden'
  27. '500':
  28. $ref: '../components/responses.yaml#/InternalError'
  29. Logout:
  30. post:
  31. operationId: logout
  32. summary: 注销并使当前用户旧Token失效
  33. parameters:
  34. - $ref: '../components/parameters.yaml#/XRequestId'
  35. responses:
  36. '200':
  37. description: 注销成功
  38. content:
  39. application/json:
  40. schema:
  41. $ref: '../components/schemas.yaml#/EmptySuccessResponse'
  42. '400':
  43. $ref: '../components/responses.yaml#/InvalidArgument'
  44. '401':
  45. $ref: '../components/responses.yaml#/AuthenticationError'
  46. '403':
  47. $ref: '../components/responses.yaml#/Forbidden'
  48. '500':
  49. $ref: '../components/responses.yaml#/InternalError'
  50. PortalVerify:
  51. post:
  52. operationId: verifyPortalLaunch
  53. summary: 统一门户跳转验签
  54. description: 透传浏览器地址栏query串验签,按需落库建档并同步组织信息;返回跳转阶段,首次进入需设置独立密码。
  55. security: []
  56. parameters:
  57. - $ref: '../components/parameters.yaml#/XRequestId'
  58. requestBody:
  59. required: true
  60. content:
  61. application/json:
  62. schema:
  63. type: object
  64. required: [query]
  65. additionalProperties: false
  66. properties:
  67. query: {type: string, minLength: 1, description: 门户跳转链接的完整query串}
  68. responses:
  69. '200':
  70. description: 验签结果
  71. content:
  72. application/json:
  73. schema:
  74. type: object
  75. required: [code, message, data, requestId]
  76. properties:
  77. code: {type: string}
  78. message: {type: string}
  79. requestId: {type: string}
  80. data:
  81. type: object
  82. required: [phase, username, realName]
  83. properties:
  84. phase: {type: string, enum: [LOGIN, SET_PASSWORD], description: SET_PASSWORD时携带一次性设密票据portalTicket}
  85. username: {type: string}
  86. realName: {type: string}
  87. portalTicket: {type: string}
  88. '400':
  89. $ref: '../components/responses.yaml#/InvalidArgument'
  90. '403':
  91. $ref: '../components/responses.yaml#/Forbidden'
  92. '500':
  93. $ref: '../components/responses.yaml#/InternalError'
  94. PortalSetupPassword:
  95. post:
  96. operationId: setupPortalPassword
  97. summary: 门户用户首次设置独立密码并登录
  98. description: 票据一次性且5分钟内有效;设置成功后签发访问令牌。
  99. security: []
  100. parameters:
  101. - $ref: '../components/parameters.yaml#/XRequestId'
  102. requestBody:
  103. required: true
  104. content:
  105. application/json:
  106. schema:
  107. type: object
  108. required: [portalTicket, newPassword, keepSignedIn]
  109. additionalProperties: false
  110. properties:
  111. portalTicket: {type: string, minLength: 1}
  112. newPassword: {type: string, minLength: 1}
  113. keepSignedIn: {type: boolean}
  114. responses:
  115. '200':
  116. description: 设密并登录成功
  117. content:
  118. application/json:
  119. schema:
  120. $ref: '../components/schemas.yaml#/LoginResponse'
  121. '400':
  122. $ref: '../components/responses.yaml#/InvalidArgument'
  123. '403':
  124. $ref: '../components/responses.yaml#/Forbidden'
  125. '500':
  126. $ref: '../components/responses.yaml#/InternalError'