You are here

private function UserInfo::__construct in Simple OAuth (OAuth2) & OpenID Connect 5.x

UserInfo constructor.

Parameters

\Drupal\Core\Session\AccountProxyInterface $user: The user.

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

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.

File

src/Controller/UserInfo.php, line 53

Class

UserInfo
Controller for the User Info endpoint.

Namespace

Drupal\simple_oauth\Controller

Code

private function __construct(AccountProxyInterface $user, SerializerInterface $serializer, ConfigFactoryInterface $config_factory) {
  $this->user = $user
    ->getAccount();
  $this->serializer = $serializer;
  $this->config = $config_factory
    ->get('simple_oauth.settings');
}