post.json 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. "operationId": "setupUser2fa",
  3. "summary": "Start 2FA setup, returns QR code URL",
  4. "tags": ["users"],
  5. "parameters": [
  6. {
  7. "in": "path",
  8. "name": "userID",
  9. "schema": {
  10. "type": "integer",
  11. "minimum": 1
  12. },
  13. "required": true,
  14. "description": "User ID",
  15. "example": 2
  16. }
  17. ],
  18. "responses": {
  19. "200": {
  20. "content": {
  21. "application/json": {
  22. "examples": {
  23. "default": {
  24. "value": {
  25. "secret": "JZYCEBIEEJYUGPQM",
  26. "otpauth_url": "otpauth://totp/Nginx%20Proxy%20Manager:jc%40jc21.com?secret=JZYCEBIEEJYUGPQM&period=30&digits=6&algorithm=SHA1&issuer=Nginx%20Proxy%20Manager"
  27. }
  28. }
  29. },
  30. "schema": {
  31. "type": "object",
  32. "required": ["secret", "otpauth_url"],
  33. "additionalProperties": false,
  34. "properties": {
  35. "secret": {
  36. "description": "TOTP Secret",
  37. "example": "JZYCEBIEEJYUGPQM",
  38. "type": "string"
  39. },
  40. "otpauth_url": {
  41. "description": "OTP Auth URL for QR Code generation",
  42. "example": "otpauth://totp/Nginx%20Proxy%20Manager:jc%40jc21.com?secret=JZYCEBIEEJYUGPQM&period=30&digits=6&algorithm=SHA1&issuer=Nginx%20Proxy%20Manager",
  43. "type": "string"
  44. }
  45. }
  46. }
  47. }
  48. },
  49. "description": "200 response"
  50. }
  51. }
  52. }