post.json 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. },
  17. "scope": {
  18. "minLength": 1,
  19. "type": "string",
  20. "enum": ["user"]
  21. },
  22. "secret": {
  23. "minLength": 1,
  24. "type": "string"
  25. }
  26. },
  27. "required": ["identity", "secret"],
  28. "type": "object"
  29. }
  30. }
  31. }
  32. },
  33. "responses": {
  34. "200": {
  35. "content": {
  36. "application/json": {
  37. "examples": {
  38. "default": {
  39. "value": {
  40. "result": {
  41. "expires": "2025-02-04T20:40:46.340Z",
  42. "token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4"
  43. }
  44. }
  45. }
  46. },
  47. "schema": {
  48. "$ref": "../../components/token-object.json"
  49. }
  50. }
  51. },
  52. "description": "200 response"
  53. }
  54. }
  55. }