diff --git a/static/swagger.yaml b/static/swagger.yaml index 1c4f80d..6b57675 100644 --- a/static/swagger.yaml +++ b/static/swagger.yaml @@ -693,6 +693,102 @@ paths: schema: $ref: '#/components/schemas/ServerErrorSchema' + /auth/2fa/enable: + post: + tags: + - auth + summary: Enable two-factor authentication + security: + - bearerAuth: [] + responses: + '201': + description: Two-factor authentication enabled successfully + content: + application/json: + schema: + type: object + properties: + status: + type: string + example: "success" + message: + type: string + example: "Two-factor authentication enabled successfully" + statusCode: + type: integer + example: 201 + data: + type: object + properties: + secret: + type: string + example: "secret" + qr_code: + type: string + example: "qr_code" + '400': + description: Invalid input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestErrorSchema' + + + /auth/2fa/verify: + post: + tags: + - auth + summary: Verify two-factor authentication + security: + - bearerAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + token: + type: string + required: + - token + responses: + '200': + description: Token verified successfully + content: + application/json: + schema: + type: object + properties: + status: + type: string + example: "success" + statusCode: + type: integer + example: 200 + message: + type: string + example: "Token verified successfully" + data: + $ref: "#/components/schemas/UserSchema" + '400': + description: Invalid input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestErrorSchema' + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/UnprocessedEntityErrorSchema' + '500': + description: Server error + content: + application/json: + schema: + $ref: '#/components/schemas/ServerErrorSchema' #User path /users/{userId}: get: @@ -6436,4 +6532,4 @@ components: bearerAuth: type: http scheme: bearer - bearerFormat: JWT \ No newline at end of file + bearerFormat: JWT