function RestAuthenticationController::logout

Same name and namespace in other branches
  1. 11.x core/modules/rest/src/Controller/RestAuthenticationController.php \Drupal\rest\Controller\RestAuthenticationController::logout()

Logs out a user.

Return value

\Symfony\Component\HttpFoundation\Response The response object.

1 string reference to 'RestAuthenticationController::logout'
rest.routing.yml in core/modules/rest/rest.routing.yml
core/modules/rest/rest.routing.yml

File

core/modules/rest/src/Controller/RestAuthenticationController.php, line 235

Class

RestAuthenticationController
Provides controllers for login, login status and logout via HTTP requests.

Namespace

Drupal\rest\Controller

Code

public function logout() : Response {
  $this->userLogout();
  return new Response(NULL, 204);
}

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