From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81e499698343740e X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.swip.net!swipnet!newsfeed1.funet.fi!newsfeeds.funet.fi!news2.cc.tut.fi!news.cc.tut.fi!not-for-mail From: Tero Koskinen Newsgroups: comp.lang.ada Subject: Re: GNAT.Sockets: Authentication at HTTP Server Date: Tue, 11 Sep 2007 20:07:35 +0300 Message-ID: <20070911200735.42f081e9.tero.koskinen@iki.fi> References: <1189528985.876768.122400@57g2000hsv.googlegroups.com> NNTP-Posting-Host: ip154.otanner14.opintanner.fi Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: news.cc.tut.fi 1189530455 23051 195.148.53.154 (11 Sep 2007 17:07:35 GMT) X-Complaints-To: abuse@tut.fi NNTP-Posting-Date: Tue, 11 Sep 2007 17:07:35 +0000 (UTC) X-Newsreader: Sylpheed 2.4.3 (GTK+ 2.10.13; i386-unknown-openbsd4.2) Xref: g2news2.google.com comp.lang.ada:1891 Date: 2007-09-11T20:07:35+03:00 List-Id: On Tue, 11 Sep 2007 16:43:05 -0000 Adrian Hoe wrote: > Hi, > > How do I connect to a HTTP server (a website) which requires > authentication (Username, Password) with GNAT.Sockets? If you can use GPL/GMGPL code, look how AWS does it and take its client side code. AWS uses GNAT.Sockets for communication. AWS documentation at https://libre.adacore.com/aws/aws-gpl-2.3.0.html#Client-side gives following example: > If the Web page is protected and you must pass the request through an > authenticating proxy, the call will becomes: > > Data := Client.Get > (URL => "http://www.mydomain.net/protected/index.html" > User => "me", > Pwd => "mypwd", > Proxy => "192.168.67.1", > Proxy_User => "puser", > Proxy_Pwd => "ppwd"); Although, if a website uses some custom authentication method, then you probably need to play with HTML parsing, cookies, sessions, and stuff. -- Tero Koskinen - http://iki.fi/tero.koskinen/