Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » Proxy Authentication Required
Proxy Authentication Required [message #25898] Thu, 18 March 2010 16:14 Go to next message
koldo is currently offline  koldo
Messages: 2944
Registered: August 2008
Veteran
Hello all

I need to use an http client from a place with proxy that requires authentication.

I have tested it with CURL and NTLM authentication works well.

Do you know if it is possible to use NTLM or other authentication protocols like negotiation or kerberos in Upp?

This was the cause tojocky's Google Translator did not worked for me Mad


Best regards
Iñaki
Re: Proxy Authentication Required [message #25942 is a reply to message #25898] Sun, 21 March 2010 08:17 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

AFAIR Web package and HttpClient class supports Proxy. Just look at it's methods closer.
Re: Proxy Authentication Required [message #25943 is a reply to message #25942] Sun, 21 March 2010 08:32 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2944
Registered: August 2008
Veteran
Mindtraveller wrote on Sun, 21 March 2010 08:17

AFAIR Web package and HttpClient class supports Proxy. Just look at it's methods closer.

Hello Mindtraveller

Is perhaps the key here? (httpcli.cpp)
	if(use_proxy && !IsNull(proxy_username))
		 request << "Proxy-Authorization: basic " << Base64Encode(proxy_username + ':' + proxy_password) << "\r\n";
	if(!IsNull(digest))
		request << "Authorization: Digest " << digest << "\r\n";
	else if(!force_digest && (!IsNull(username) || !IsNull(password)))
		request << "Authorization: basic " << Base64Encode(username + ":" + password) << "\r\n";


Does in anyway the code would run something like this? (I do not have any idea)

request << "Proxy-Authorization: NTLM " << Base64Encode(proxy_username + ':' + proxy_password) << "\r\n";


Best regards
Iñaki
Re: Proxy Authentication Required [message #25960 is a reply to message #25943] Mon, 22 March 2010 10:33 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2944
Registered: August 2008
Veteran
No, it does not work Sad

request << "Proxy-Authorization: NTLM " << Base64Encode(proxy_username + ':' + proxy_password) << "\r\n";


Best regards
Iñaki
Re: Proxy Authentication Required [message #26076 is a reply to message #25960] Tue, 30 March 2010 16:07 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2944
Registered: August 2008
Veteran
Hello

Any comment from package author?


Best regards
Iñaki
Re: Proxy Authentication Required [message #26079 is a reply to message #26076] Tue, 30 March 2010 21:26 Go to previous messageGo to next message
rylek is currently offline  rylek
Messages: 79
Registered: November 2005
Member
What say of it? what say conscience grim, That sceptre in my path?

Hello there!

I am the author of the http client yet I'm quite willing to admit I know absolutely nothing about NTLM. Not long ago I was forced to implement digest authentization against the server (not to the proxy) and while conceptually the trick is more or less the same as in case of basic authentization, the code is in fact loads more complicated. I agree that the more protocols supported the better but it would be very hard for me to implement something that I don't use and I doubt I have ever heard about. If you consider extending the HttpClient in this sense, I'm quite ready to give you a virtual helping hand and cooperate in any way imaginable.

Regards

Tomas
Re: Proxy Authentication Required [message #26080 is a reply to message #26079] Tue, 30 March 2010 21:34 Go to previous message
koldo is currently offline  koldo
Messages: 2944
Registered: August 2008
Veteran
rylek wrote on Tue, 30 March 2010 21:26

What say of it? what say conscience grim, That sceptre in my path?

Hello there!

I am the author of the http client yet I'm quite willing to admit I know absolutely nothing about NTLM. Not long ago I was forced to implement digest authentization against the server (not to the proxy) and while conceptually the trick is more or less the same as in case of basic authentization, the code is in fact loads more complicated. I agree that the more protocols supported the better but it would be very hard for me to implement something that I don't use and I doubt I have ever heard about. If you consider extending the HttpClient in this sense, I'm quite ready to give you a virtual helping hand and cooperate in any way imaginable.

Regards

Tomas

Laughing

Thank you Tomas. I will live without that for now. Smile


Best regards
Iñaki
Previous Topic: Exclusion of underline chars in UrlEncode function
Next Topic: BUG: HttpClient authentication doesn't work with some servers
Goto Forum:
  


Current Time: Thu Apr 18 13:16:47 CEST 2019

Total time taken to generate the page: 0.00774 seconds