Skip to content

Commit 1202a7f

Browse files
committed
[jwt] improve handlers docs
1 parent 3694884 commit 1202a7f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

internal/sms-gateway/handlers/thirdparty/auth.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ func (h *AuthHandler) postToken(user users.User, c *fiber.Ctx) error {
8080
// @Security ApiAuth
8181
// @Security JWTAuth
8282
// @Tags User, Auth
83+
// @Param jti path string true "JWT ID"
8384
// @Success 204 "No Content"
8485
// @Failure 401 {object} smsgateway.ErrorResponse "Unauthorized"
8586
// @Failure 403 {object} smsgateway.ErrorResponse "Forbidden"

internal/sms-gateway/openapi/docs.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ const docTemplate = `{
101101
"Auth"
102102
],
103103
"summary": "Revoke token",
104+
"parameters": [
105+
{
106+
"type": "string",
107+
"description": "JWT ID",
108+
"name": "jti",
109+
"in": "path",
110+
"required": true
111+
}
112+
],
104113
"responses": {
105114
"204": {
106115
"description": "No Content"

0 commit comments

Comments
 (0)