added logout

This commit is contained in:
Mephimeow
2026-06-12 10:18:04 +00:00
parent 130d5d5e3d
commit a26cd891e4
11 changed files with 244 additions and 5 deletions
+61
View File
@@ -56,6 +56,55 @@
}
}
},
"/api/auth/logout": {
"post": {
"description": "Invalidate a refresh token (logout)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Logout epta",
"parameters": [
{
"description": "Refresh token to invalidate",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/internal_auth.LogoutRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/internal_auth.ErrorResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/internal_auth.ErrorResponse"
}
}
}
}
},
"/api/auth/me": {
"get": {
"security": [
@@ -226,6 +275,18 @@
}
}
},
"internal_auth.LogoutRequest": {
"type": "object",
"required": [
"refresh_token"
],
"properties": {
"refresh_token": {
"type": "string",
"example": "dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4="
}
}
},
"internal_auth.RefreshRequest": {
"type": "object",
"required": [