mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-01-21 19:25:43 +00:00
- use existing access mechanisms for validation - adds swagger/schema and validation of incoming payload
40 lines
1.1 KiB
JSON
40 lines
1.1 KiB
JSON
{
|
|
"operationId": "setupUser2fa",
|
|
"summary": "Start 2FA setup, returns QR code URL",
|
|
"tags": ["users"],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"examples": {
|
|
"default": {
|
|
"value": {
|
|
"secret": "JZYCEBIEEJYUGPQM",
|
|
"otpauth_url": "otpauth://totp/Nginx%20Proxy%20Manager:jc%40jc21.com?secret=JZYCEBIEEJYUGPQM&period=30&digits=6&algorithm=SHA1&issuer=Nginx%20Proxy%20Manager"
|
|
}
|
|
}
|
|
},
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["secret", "otpauth_url"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"secret": {
|
|
"description": "TOTP Secret",
|
|
"example": "JZYCEBIEEJYUGPQM",
|
|
"type": "string"
|
|
},
|
|
"otpauth_url": {
|
|
"description": "OTP Auth URL for QR Code generation",
|
|
"example": "otpauth://totp/Nginx%20Proxy%20Manager:jc%40jc21.com?secret=JZYCEBIEEJYUGPQM&period=30&digits=6&algorithm=SHA1&issuer=Nginx%20Proxy%20Manager",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "200 response"
|
|
}
|
|
}
|
|
}
|