post.json 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {
  2. "operationId": "requestToken",
  3. "summary": "Request a new access token from credentials",
  4. "tags": ["tokens"],
  5. "requestBody": {
  6. "description": "Credentials Payload",
  7. "required": true,
  8. "content": {
  9. "application/json": {
  10. "schema": {
  11. "additionalProperties": false,
  12. "properties": {
  13. "identity": {
  14. "minLength": 1,
  15. "type": "string",
  16. "example": "[email protected]"
  17. },
  18. "scope": {
  19. "minLength": 1,
  20. "type": "string",
  21. "enum": ["user"],
  22. "example": "user"
  23. },
  24. "secret": {
  25. "minLength": 1,
  26. "type": "string",
  27. "example": "bigredhorsebanana"
  28. }
  29. },
  30. "required": ["identity", "secret"],
  31. "type": "object"
  32. },
  33. "example": {
  34. "identity": "[email protected]",
  35. "secret": "bigredhorsebanana"
  36. }
  37. }
  38. }
  39. },
  40. "responses": {
  41. "200": {
  42. "content": {
  43. "application/json": {
  44. "examples": {
  45. "default": {
  46. "value": {
  47. "expires": "2025-02-04T20:40:46.340Z",
  48. "token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4"
  49. }
  50. }
  51. },
  52. "schema": {
  53. "oneOf": [
  54. {
  55. "$ref": "../../components/token-object.json"
  56. },
  57. {
  58. "$ref": "../../components/token-challenge.json"
  59. }
  60. ]
  61. }
  62. }
  63. },
  64. "description": "200 response"
  65. }
  66. }
  67. }