From cce3bbcfc1d638ffc7fcd5e446f153ae6704839f Mon Sep 17 00:00:00 2001 From: Lewis Cowles Date: Sun, 24 May 2015 11:11:32 +0100 Subject: [PATCH 1/3] Auth speed boost --- src/Fetch/Server.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index c5c9ced..c86b52e 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -147,11 +147,15 @@ class Server * * @param string $username * @param string $password + * @param bool $tryFasterAuth tries to auth faster by disabling GSSAPI & NTLM auth methods (set to false if you use either of these auth methods) */ - public function setAuthentication($username, $password) + public function setAuthentication($username, $password, $tryFasterAuth=true) { $this->username = $username; $this->password = $password; + if( $tryFasterAuth ) { + $this->setParam( 'DISABLE_AUTHENTICATOR', array( 'GSSAPI', 'NTLM' ) ); + } } /** From 35a756ee58975f046ca2539fa57fb4302cb05a31 Mon Sep 17 00:00:00 2001 From: Lewis Cowles Date: Sun, 24 May 2015 11:26:40 +0100 Subject: [PATCH 2/3] I think this should fix the PSR check --- src/Fetch/Server.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index c86b52e..f9c56c1 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -147,14 +147,14 @@ class Server * * @param string $username * @param string $password - * @param bool $tryFasterAuth tries to auth faster by disabling GSSAPI & NTLM auth methods (set to false if you use either of these auth methods) + * @param bool $tryFasterAuth tries to auth faster by disabling GSSAPI & NTLM auth methods (set to false if you use either of these auth methods) */ public function setAuthentication($username, $password, $tryFasterAuth=true) { $this->username = $username; $this->password = $password; if( $tryFasterAuth ) { - $this->setParam( 'DISABLE_AUTHENTICATOR', array( 'GSSAPI', 'NTLM' ) ); + $this->setParam('DISABLE_AUTHENTICATOR', array('GSSAPI','NTLM')); } } From 3a53e1891039b1ff5231542b6f114f00e4681b98 Mon Sep 17 00:00:00 2001 From: Lewis Cowles Date: Sun, 24 May 2015 11:31:38 +0100 Subject: [PATCH 3/3] PSR Nonsense strikes again... --- src/Fetch/Server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index f9c56c1..547fc12 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -153,7 +153,7 @@ class Server { $this->username = $username; $this->password = $password; - if( $tryFasterAuth ) { + if ($tryFasterAuth) { $this->setParam('DISABLE_AUTHENTICATOR', array('GSSAPI','NTLM')); } }