Ejemplo n.º 1
0
 static function unsafe_set_user($username)
 {
     Authentication::$user = $username;
 }
Ejemplo n.º 2
0
 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()))]]);
 }