mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 07:35:24 +00:00
docs(api): describe cookie and API key authentication (#1540)
This commit is contained in:
1 parent
c78bc37eb2
commit
d3568e484d
4 files changed
+21
-8
No files matched your search
@@ -183,8 +183,6 @@ export function registerHostBulkRoutes(
|
|||||||
* patch:
|
* patch:
|
||||||
* summary: Bulk update partial fields on multiple SSH hosts
|
* summary: Bulk update partial fields on multiple SSH hosts
|
||||||
* tags: [SSH]
|
* tags: [SSH]
|
||||||
* security:
|
|
||||||
* - bearerAuth: []
|
|
||||||
* requestBody:
|
* requestBody:
|
||||||
* required: true
|
* required: true
|
||||||
* content:
|
* content:
|
||||||
|
|||||||
@@ -493,8 +493,6 @@ router.post(
|
|||||||
* description: Creates a host owned by the user assigned to the API key. The user's encrypted data must be unlocked by an active sign-in.
|
* description: Creates a host owned by the user assigned to the API key. The user's encrypted data must be unlocked by an active sign-in.
|
||||||
* tags:
|
* tags:
|
||||||
* - Host Enrollment
|
* - Host Enrollment
|
||||||
* security:
|
|
||||||
* - bearerAuth: []
|
|
||||||
* requestBody:
|
* requestBody:
|
||||||
* required: true
|
* required: true
|
||||||
* content:
|
* content:
|
||||||
|
|||||||
@@ -1990,8 +1990,6 @@ router.delete(
|
|||||||
* summary: Set personal authentication for a shared host protocol
|
* summary: Set personal authentication for a shared host protocol
|
||||||
* description: Selects one of the authenticated recipient's own credentials, or clears the selection with null. The protocol is "ssh" or one a plugin declares.
|
* description: Selects one of the authenticated recipient's own credentials, or clears the selection with null. The protocol is "ssh" or one a plugin declares.
|
||||||
* tags: [RBAC]
|
* tags: [RBAC]
|
||||||
* security:
|
|
||||||
* - bearerAuth: []
|
|
||||||
*/
|
*/
|
||||||
router.put(
|
router.put(
|
||||||
"/host-access/:hostId/auth/:protocol",
|
"/host-access/:hostId/auth/:protocol",
|
||||||
@@ -2047,8 +2045,6 @@ router.put(
|
|||||||
* get:
|
* get:
|
||||||
* summary: Get the current recipient's shared-host protocol authentication override
|
* summary: Get the current recipient's shared-host protocol authentication override
|
||||||
* tags: [RBAC]
|
* tags: [RBAC]
|
||||||
* security:
|
|
||||||
* - bearerAuth: []
|
|
||||||
*/
|
*/
|
||||||
router.get(
|
router.get(
|
||||||
"/host-access/:hostId/auth/:protocol",
|
"/host-access/:hostId/auth/:protocol",
|
||||||
|
|||||||
@@ -65,6 +65,21 @@ const swaggerOptions: SwaggerJSDocOptions = {
|
|||||||
type: "http",
|
type: "http",
|
||||||
scheme: "bearer",
|
scheme: "bearer",
|
||||||
bearerFormat: "JWT",
|
bearerFormat: "JWT",
|
||||||
|
description: "Session JWT sent as Authorization: Bearer <JWT>.",
|
||||||
|
},
|
||||||
|
cookieAuth: {
|
||||||
|
type: "apiKey",
|
||||||
|
in: "cookie",
|
||||||
|
name: "jwt",
|
||||||
|
description:
|
||||||
|
"Session JWT cookie set at sign-in. When present, it takes precedence over the Authorization header.",
|
||||||
|
},
|
||||||
|
apiKeyAuth: {
|
||||||
|
type: "http",
|
||||||
|
scheme: "bearer",
|
||||||
|
bearerFormat: "tmx_<api key>",
|
||||||
|
description:
|
||||||
|
"API key sent as Authorization: Bearer tmx_<api key>. Permissions follow the key owner's account; encrypted data must be unlocked separately. API keys cannot impersonate another user.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
schemas: {
|
schemas: {
|
||||||
@@ -81,6 +96,12 @@ const swaggerOptions: SwaggerJSDocOptions = {
|
|||||||
{
|
{
|
||||||
bearerAuth: [],
|
bearerAuth: [],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
cookieAuth: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
apiKeyAuth: [],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
tags: [
|
tags: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user