Skip to content

Commit 84704da

Browse files
committed
Added access and refresh revokes
1 parent 603ad25 commit 84704da

File tree

1 file changed

+80
-1
lines changed

1 file changed

+80
-1
lines changed

backend/schemas/swagger.yaml

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,85 @@ paths:
165165
type: string
166166
description: The new and fresh access token
167167
example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDAzMjYzMjksIm5iZiI6MTYwMDMyNjMyOSwianRpIjoiZTA0ZWQ3NmMtMTcxMC00ZjQ4LWFkNzMtZDBmOTMxZTkxNzM0IiwiZXhwIjoxNjAwMzI3MjI5LCJpZGVudGl0eSI6eyJpZCI6MSwiZW1haWwiOiJmb29AZXhhbXBsZS5vcmciLCJ1c2VybmFtZSI6ImZvbyIsImlzX29ubGluZSI6MCwiZGF0ZV9sYXN0c2VlbiI6IldlZCwgMTYgU2VwIDIwMjAgMTU6Mzk6MDQgR01UIn0sImZyZXNoIjpmYWxzZSwidHlwZSI6ImFjY2VzcyJ9.dFJMy-04thKA9Q268bgQhiqLDrkqnCOCaiwHJ1XXook
168+
/auth/access_revoke:
169+
post:
170+
tags:
171+
- Authentication
172+
summary: Revokes the access token
173+
description: ""
174+
operationId: revokeAccessToken
175+
security:
176+
- accessToken: [ ]
177+
responses:
178+
"409":
179+
description: Unauthorized error, token already revoked.
180+
content:
181+
application/json:
182+
schema:
183+
type: object
184+
properties:
185+
msg:
186+
type: string
187+
example: Token has been revoked
188+
default: Token has been revoked
189+
"200":
190+
description: Token successfully revoked
191+
content:
192+
application/json:
193+
schema:
194+
type: object
195+
properties:
196+
success:
197+
type: boolean
198+
description: If the request is a success
199+
example: true
200+
code:
201+
type: integer
202+
description: The status code
203+
example: 200
204+
message:
205+
type: string
206+
example: Access token revoked
207+
/auth/refresh_revoke:
208+
post:
209+
tags:
210+
- Authentication
211+
summary: Revokes the refresh token
212+
description: ""
213+
operationId: revokeRefreshToken
214+
security:
215+
- refreshToken: [ ]
216+
responses:
217+
"409":
218+
description: Unauthorized error, token already revoked.
219+
content:
220+
application/json:
221+
schema:
222+
type: object
223+
properties:
224+
msg:
225+
type: string
226+
example: Token has been revoked
227+
default: Token has been revoked
228+
"200":
229+
description: Token successfully revoked
230+
content:
231+
application/json:
232+
schema:
233+
type: object
234+
properties:
235+
success:
236+
type: boolean
237+
description: If the request is a success
238+
example: true
239+
code:
240+
type: integer
241+
description: The status code
242+
example: 200
243+
message:
244+
type: string
245+
example: Refresh token revoked
246+
168247

169248
servers:
170249
- url: https://api.matcha.com
@@ -263,7 +342,7 @@ components:
263342
solution:
264343
type: string
265344
securitySchemes:
266-
bearerAuth:
345+
accessToken:
267346
type: http
268347
scheme: bearer
269348
bearerFormat: JWT

0 commit comments

Comments
 (0)