static function unsafe_set_user($username) { Authentication::$user = $username; }
public function __construct(HttpTranslator $translator, EventDispatcherInterface $dispatcher, Server $server, Authentication $authentication, int $timeout = 60) { $this->translator = $translator; $this->dispatcher = $dispatcher; $this->http = new Client(['base_uri' => (string) $server, 'timeout' => $timeout, 'headers' => ['Authorization' => base64_encode(sprintf('%s:%s', $authentication->user(), $authentication->password()))]]); }