![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/app/bundles/UserBundle/Security/Authentication/Token/ |
<?php namespace Mautic\UserBundle\Security\Authentication\Token; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Guard\Token\GuardTokenInterface; class PluginToken extends AbstractToken implements GuardTokenInterface { private ?string $providerKey; /** * @param UserInterface|string|null $user * @param array<string> $roles */ public function __construct( ?string $providerKey, private ?string $authenticatingService = null, $user = null, private string $credentials = '', array $roles = [], private ?Response $response = null ) { parent::__construct($roles); if ('' === $providerKey) { throw new \InvalidArgumentException('$providerKey must not be empty.'); } if (null !== $user) { $this->setUser($user); } $this->providerKey = $providerKey; $this->setAuthenticated(count($roles) > 0); } public function getCredentials(): string { return $this->credentials; } public function getProviderKey(): ?string { return $this->providerKey; } public function getAuthenticatingService(): ?string { return $this->authenticatingService; } public function getResponse(): ?Response { return $this->response; } /** * @return array<int, mixed> */ public function __serialize(): array { return array_merge([$this->authenticatingService, $this->credentials, $this->providerKey, parent::__serialize()]); } /** * @param array<int, mixed> $data */ public function __unserialize(array $data): void { [$this->authenticatingService, $this->credentials, $this->providerKey, $parentArray] = $data; parent::__unserialize($parentArray); } }