This commit is contained in:
Julian Gassner
2025-02-07 12:39:57 +10:00
committed by GitHub
19 changed files with 595 additions and 119 deletions

View File

@@ -0,0 +1,44 @@
{
"operationId": "disableMfa",
"summary": "Disable multi-factor authentication for a user",
"tags": [
"MFA"
],
"requestBody": {
"description": "Payload to disable MFA",
"required": true,
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"secret": {
"type": "string",
"minLength": 1
}
},
"required": [
"secret"
]
}
}
}
},
"responses": {
"200": {
"description": "MFA disabled successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,44 @@
{
"operationId": "enableMfa",
"summary": "Enable multi-factor authentication for a user",
"tags": [
"MFA"
],
"requestBody": {
"description": "MFA Token Payload",
"required": true,
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"token": {
"type": "string",
"minLength": 1
}
},
"required": [
"token"
]
}
}
}
},
"responses": {
"200": {
"description": "MFA enabled successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
}
}
}
}
}
}
}

View File

@@ -22,6 +22,10 @@
"secret": {
"minLength": 1,
"type": "string"
},
"mfa_token": {
"minLength": 1,
"type": "string"
}
},
"required": ["identity", "secret"],

View File

@@ -14,7 +14,7 @@
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"additionalProperties": true,
"required": ["name", "nickname", "email"],
"properties": {
"name": {

View File

@@ -24,6 +24,16 @@
"$ref": "./paths/get.json"
}
},
"/mfa/enable": {
"post": {
"$ref": "./paths/mfa/enable/post.json"
}
},
"/mfa/delete": {
"delete": {
"$ref": "./paths/mfa/delete/delete.json"
}
},
"/audit-log": {
"get": {
"$ref": "./paths/audit-log/get.json"