Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug with httprio basic athentification

95 views
Skip to first unread message

oops

unread,
May 10, 2006, 4:18:32 AM5/10/06
to
Hello, sorry for my english i m french.

I can't log me to a service with basic authentification.

I ve password and login in httpwebnode but i don't see it in the http
header.

Can you help me please ?


Deepak Shenoy (TeamB)

unread,
May 10, 2006, 5:26:16 AM5/10/06
to
oops wrote:

From: http://shenoyatwork.blogspot.com/2004/10/back-after-break.html

Issues: The HTTPRio.HTTPWebNode.UserName and .Password properties are
used only in situations where theres a proxy. But let's assume you
wanted to use these for basic authentication. You're going to have to
set an event handler for HttpRio.HttpWebNode.OnBeforePost. You get a
Data parameter here, and this is the HRequest used for sending the data.

All you now have to do is write something like this in the event
handler:


if not InternetSetOption(Data, INTERNET_OPTION_USERNAME,
PChar(HTTPRIO1.HTTPWebNode.UserName),
Length(HTTPRIO1.HTTPWebNode.UserName)) then
ShowMessage(SysErrorMessage(GetLastError));

if not InternetSetOption(Data, INTERNET_OPTION_PASSWORD,
PChar(HTTPRIO1.HTTPWebNode.Password),
Length (HTTPRIO1.HTTPWebNode.Password)) then
ShowMessage(SysErrorMessage(GetLastError));

You can of course set any other password you want. Note: You need to
add WinInet and SOAPHttpTrans to your uses clause.

--
Deepak Shenoy (TeamB)
http://shenoyatwork.blogspot.com

oops

unread,
May 10, 2006, 5:22:54 AM5/10/06
to
no idea ?

"oops" <a...@ppp.fr> a écrit dans le message de news:
4461...@newsgroups.borland.com...

oops

unread,
May 10, 2006, 5:27:59 AM5/10/06
to
hello, i ve alway try it but i don't have username and password in my http
header ?


"Deepak Shenoy (TeamB)" <nom...@nomail.com> a écrit dans le message de news:
4461b1b8$1...@newsgroups.borland.com...

oops

unread,
May 10, 2006, 5:30:07 AM5/10/06
to
when i a dd it, i ve always :

- <HTTPHeaders>
<soapaction>""</soapaction>
<content-type>text/xml</content-type>
<user-agent>Borland SOAP 1.2</user-agent>
<host>localhost:8080</host>
<content-length>818</content-length>
<connection>Keep-Alive</connection>
<cache-control>no-cache</cache-control>
</HTTPHeaders>

But nothing about password

"Deepak Shenoy (TeamB)" <nom...@nomail.com> a écrit dans le message de news:
4461b1b8$1...@newsgroups.borland.com...

oops

unread,
May 10, 2006, 8:00:27 AM5/10/06
to
have oy try it ?

"Deepak Shenoy (TeamB)" <nom...@nomail.com> a écrit dans le message de news:
4461b1b8$1...@newsgroups.borland.com...

oops

unread,
May 10, 2006, 9:18:52 AM5/10/06
to
i can't believe there is nobody who use soap and basic authentification ...

"oops" <a...@ppp.fr> a écrit dans le message de news:
4461d5da$1...@newsgroups.borland.com...

oops

unread,
May 10, 2006, 10:08:01 AM5/10/06
to
it's good with it :

tLogin := 'Basic ' + Base64Encode('monlogin:monpasse');


if not HttpAddRequestHeaders( data,
pChar('Authorization:'+tLogin),
Length('Authorization:'+tLogin),
HTTP_ADDREQ_FLAG_ADD) then
ShowMessage(SysErrorMessage(GetLastError));


"Deepak Shenoy (TeamB)" <nom...@nomail.com> a écrit dans le message de news:
4461b1b8$1...@newsgroups.borland.com...

0 new messages