function RestAuthenticationController::__construct

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

Parameters

\Drupal\user\UserFloodControlInterface $userFloodControl: The user flood control service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Access\CsrfTokenGenerator $csrfToken: The CSRF token generator.

\Drupal\user\UserAuthenticationInterface $userAuth: The user authentication.

\Drupal\Core\Routing\RouteProviderInterface $routeProvider: The route provider.

\Symfony\Component\Serializer\Serializer $serializer: The serializer.

array $serializerFormats: The available serialization formats.

\Psr\Log\LoggerInterface $logger: A logger instance.

File

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

Class

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

Namespace

Drupal\rest\Controller

Code

public function __construct(protected UserFloodControlInterface $userFloodControl, EntityTypeManagerInterface $entity_type_manager, protected CsrfTokenGenerator $csrfToken, protected UserAuthenticationInterface $userAuth, protected RouteProviderInterface $routeProvider, protected Serializer $serializer, protected array $serializerFormats, protected LoggerInterface $logger) {
  $this->entityTypeManager = $entity_type_manager;
}

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