rest.routing.yml

Same filename and directory in other branches
  1. 8.9.x core/modules/rest/rest.routing.yml
  2. 11.x core/modules/rest/rest.routing.yml
core/modules/rest/rest.routing.yml
3 string references to YAML keys in rest.routing.yml
RestAuthenticationController::login in core/modules/rest/src/Controller/RestAuthenticationController.php
Logs in a user.
RestLoginHttpTest::getLoginStatusUrlString in core/modules/rest/tests/src/Functional/RestLoginHttpTest.php
Gets the URL string for checking login for a given serialization format.
UserRouteAlterSubscriber::onRoutingAlterAddFormats in core/modules/serialization/src/EventSubscriber/UserRouteAlterSubscriber.php
Adds supported formats to the user authentication HTTP routes.

File

core/modules/rest/rest.routing.yml

View source
  1. rest.pass:
  2. path: '/user/password'
  3. defaults:
  4. _controller: \Drupal\rest\Controller\RestAuthenticationController::resetPassword
  5. methods: [POST]
  6. requirements:
  7. _access: 'TRUE'
  8. _format: 'json'
  9. rest.login:
  10. path: '/user/login'
  11. defaults:
  12. _controller: \Drupal\rest\Controller\RestAuthenticationController::login
  13. methods: [POST]
  14. requirements:
  15. _user_is_logged_in: 'FALSE'
  16. _format: 'json'
  17. rest.login_status:
  18. path: '/user/login_status'
  19. defaults:
  20. _controller: \Drupal\rest\Controller\RestAuthenticationController::loginStatus
  21. methods: [GET]
  22. requirements:
  23. _access: 'TRUE'
  24. _format: 'json'
  25. rest.logout:
  26. path: '/user/logout'
  27. defaults:
  28. _controller: \Drupal\rest\Controller\RestAuthenticationController::logout
  29. methods: [POST]
  30. requirements:
  31. _user_is_logged_in: 'TRUE'
  32. _format: 'json'
  33. _csrf_token: 'TRUE'

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.