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 » Windows authenticated web page load
Windows authenticated web page load [message #50261] Thu, 06 September 2018 13:31 Go to next message
koldo is currently offline  koldo
Messages: 2982
Registered: August 2008
Veteran
Hello Oblivion

I wanted to load the contents of a https web page in an intranet with windows authentication.
Is there a similar sample to do it? How would you do it?


Best regards
Iñaki
Re: Windows authenticated web page load [message #50263 is a reply to message #50261] Thu, 06 September 2018 15:23 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 574
Registered: August 2007
Location: Turkey
Contributor
Hello Koldo,

Quote:
Hello Oblivion

I wanted to load the contents of a https web page in an intranet with windows authentication.
Is there a similar sample to do it? How would you do it?


In general?

I had to (several times in the past).

1) If you are trying to access from a web site via intranet (and Windows Authentication, using SSO or credential prompt) browsers (FF, Chromium an IE) already support this.
IIRC there was even a FF extention that can simplify the browser configuration.

2) If you want to load the content of a https site programatically, using NTLM/Kerberos (which was what I had to do), don't bother trying anything else, and simply use libcurl https://curl.haxx.se/

It has a very simple interface, good documentation, and plenty of examples. (I'm sorry I can't provide an actual example of my past use cases, as I don't have access to them ATM).

Best regards,
Oblivion


[Updated on: Thu, 06 September 2018 15:30]

Report message to a moderator

Re: Windows authenticated web page load [message #50264 is a reply to message #50263] Thu, 06 September 2018 15:39 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2982
Registered: August 2008
Veteran
Thank you Oblivion

In fact curl or wget were my second choices.
Thank you for your work.


Best regards
Iñaki
Re: Windows authenticated web page load [message #50266 is a reply to message #50264] Thu, 06 September 2018 18:47 Go to previous messageGo to next message
omari is currently offline  omari
Messages: 188
Registered: March 2010
Experienced Member
Hi,

HttpRequest support Basic and Digest authentication.

 HttpRequest q; 
 q.Url("https://...");
 q.User("login", "password");
// q.Digest(); // if the server use Digest authentication
 String s = q.Execute();



regards
omari.
Re: Windows authenticated web page load [message #50269 is a reply to message #50266] Fri, 07 September 2018 13:25 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2982
Registered: August 2008
Veteran
Thank you omari

Unfortunately, it does not work.
Even with curl I cannot download the page Sad


Best regards
Iñaki
Re: Windows authenticated web page load [message #50276 is a reply to message #50269] Mon, 10 September 2018 12:07 Go to previous messageGo to next message
omari is currently offline  omari
Messages: 188
Registered: March 2010
Experienced Member
Hi koldo,

if the server use NTLM, you can use
this package

i have tested it with a sharepoint server.


regards
omari.
Re: Windows authenticated web page load [message #50278 is a reply to message #50276] Tue, 11 September 2018 10:20 Go to previous message
koldo is currently offline  koldo
Messages: 2982
Registered: August 2008
Veteran
Thank you Omari

It works!. Could you include it in Bazaar? Smile

PD.:
- The samples include
	r.Execute();
	LOG(r.GetContent());
However r.Execute() returns r.GetContent(), so this would be unnecesary

- In addition, now I can download it with Curl.


Best regards
Iñaki
Previous Topic: ASyncWork/CoWork Cancel() method leads to deadlock (when used with GuiLock)
Next Topic: Core/Inet.h -- unneeded "using namespace Upp"
Goto Forum:
  


Current Time: Sun Aug 25 20:56:27 CEST 2019

Total time taken to generate the page: 0.00707 seconds