post.json 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {
  2. "operationId": "loginWith2FA",
  3. "summary": "Verify 2FA code and get full token",
  4. "tags": ["tokens"],
  5. "requestBody": {
  6. "description": "2fa Challenge Payload",
  7. "required": true,
  8. "content": {
  9. "application/json": {
  10. "schema": {
  11. "additionalProperties": false,
  12. "properties": {
  13. "challenge_token": {
  14. "minLength": 1,
  15. "type": "string",
  16. "example": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4"
  17. },
  18. "code": {
  19. "minLength": 6,
  20. "maxLength": 8,
  21. "type": "string",
  22. "example": "012345"
  23. }
  24. },
  25. "required": ["challenge_token", "code"],
  26. "type": "object"
  27. },
  28. "example": {
  29. "challenge_token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4",
  30. "code": "012345"
  31. }
  32. }
  33. }
  34. },
  35. "responses": {
  36. "200": {
  37. "content": {
  38. "application/json": {
  39. "examples": {
  40. "default": {
  41. "value": {
  42. "expires": "2025-02-04T20:40:46.340Z",
  43. "token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4"
  44. }
  45. }
  46. },
  47. "schema": {
  48. "$ref": "../../../components/token-object.json"
  49. }
  50. }
  51. },
  52. "description": "200 response"
  53. }
  54. }
  55. }