Skip to content

Commit

Permalink
Merge pull request #325 from urizennnn/feat/2FA
Browse files Browse the repository at this point in the history
[FIX]: Update 2FA Documentation in `swagger.yaml`
  • Loading branch information
Cyberguru1 authored Aug 9, 2024
2 parents e02105e + 226bda2 commit a2b1d53
Showing 1 changed file with 97 additions and 1 deletion.
98 changes: 97 additions & 1 deletion static/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -6436,4 +6532,4 @@ components:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
bearerFormat: JWT

0 comments on commit a2b1d53

Please sign in to comment.