Board index » delphi » TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST

TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST

Hello,

with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
the OnProxyAuthorization-Event will not fire. On GET are no problems.
------------------------------------------------
Thomas Wegner

 

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


Also the:

TRequest.Username
TRequest.Password
TRequest.ProxyUsername
TRequest.ProxyPassword

Propertys are ignored. WWWAuthentication needs
then also 2 times a connection to the server, even if
authorizing were before set.
------------------------------------------------
Thomas Wegner

"Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
news:3b2bec10_1@dnews...
Hello,

with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
the OnProxyAuthorization-Event will not fire. On GET are no problems.
------------------------------------------------
Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


Are you using Stream as post parameter?

Doychin

Quote
"Thomas Wegner" <weg...@d-b-c.de> wrote in message news:3b2beec4_1@dnews...
> Also the:

> TRequest.Username
> TRequest.Password
> TRequest.ProxyUsername
> TRequest.ProxyPassword

> Propertys are ignored. WWWAuthentication needs
> then also 2 times a connection to the server, even if
> authorizing were before set.
> ------------------------------------------------
> Thomas Wegner

> "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> news:3b2bec10_1@dnews...
> Hello,

> with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> the OnProxyAuthorization-Event will not fire. On GET are no problems.
> ------------------------------------------------
> Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


Yes.
------------------------------------------------
Thomas Wegner

"Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
news:3b2c6227_2@dnews...

Quote
> Are you using Stream as post parameter?

> Doychin

> "Thomas Wegner" <weg...@d-b-c.de> wrote in message

news:3b2beec4_1@dnews...
Quote
> > Also the:

> > TRequest.Username
> > TRequest.Password
> > TRequest.ProxyUsername
> > TRequest.ProxyPassword

> > Propertys are ignored. WWWAuthentication needs
> > then also 2 times a connection to the server, even if
> > authorizing were before set.
> > ------------------------------------------------
> > Thomas Wegner

> > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > news:3b2bec10_1@dnews...
> > Hello,

> > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > the OnProxyAuthorization-Event will not fire. On GET are no problems.
> > ------------------------------------------------
> > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


Which version you are using?

If you are using Indy 8.1 get the latest source code. I think I foudn the
problem and it's been fixed.

Regarding your second question.  The reason for doing the connection twice
is that I the HTTP component has to know that there is a proxy that requers
authentication. After getting 407 response it firest the OnAuthorization
event and then uses the information provided as username and password. I
will think more on this problem but this code is still in development and
there is more to come

Doychin

Quote
"Thomas Wegner" <weg...@d-b-c.de> wrote in message news:3b2c6434_2@dnews...
> Yes.
> ------------------------------------------------
> Thomas Wegner

> "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> news:3b2c6227_2@dnews...
> > Are you using Stream as post parameter?

> > Doychin

> > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> news:3b2beec4_1@dnews...
> > > Also the:

> > > TRequest.Username
> > > TRequest.Password
> > > TRequest.ProxyUsername
> > > TRequest.ProxyPassword

> > > Propertys are ignored. WWWAuthentication needs
> > > then also 2 times a connection to the server, even if
> > > authorizing were before set.
> > > ------------------------------------------------
> > > Thomas Wegner

> > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > news:3b2bec10_1@dnews...
> > > Hello,

> > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > the OnProxyAuthorization-Event will not fire. On GET are no problems.
> > > ------------------------------------------------
> > > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


On Indy 8.0 and 8.1 from the Website, i can,
if i know, simply set once the propertys for Username/
Password (WWW- and Proxy-Authentication) and it
will work every time. In the new version of the web page,
will with each connection for the Authorisation asked and
it must a second authorized connection with the variables
of the Event be structured This increases substantially the Traffic
------------------------------------------------
Thomas Wegner

"Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
news:3b2c6b23_2@dnews...

Quote
> Which version you are using?

> If you are using Indy 8.1 get the latest source code. I think I foudn the
> problem and it's been fixed.

> Regarding your second question.  The reason for doing the connection twice
> is that I the HTTP component has to know that there is a proxy that
requers
> authentication. After getting 407 response it firest the OnAuthorization
> event and then uses the information provided as username and password. I
> will think more on this problem but this code is still in development and
> there is more to come

> Doychin

> "Thomas Wegner" <weg...@d-b-c.de> wrote in message

news:3b2c6434_2@dnews...

- Show quoted text -

Quote
> > Yes.
> > ------------------------------------------------
> > Thomas Wegner

> > "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> > news:3b2c6227_2@dnews...
> > > Are you using Stream as post parameter?

> > > Doychin

> > > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> > news:3b2beec4_1@dnews...
> > > > Also the:

> > > > TRequest.Username
> > > > TRequest.Password
> > > > TRequest.ProxyUsername
> > > > TRequest.ProxyPassword

> > > > Propertys are ignored. WWWAuthentication needs
> > > > then also 2 times a connection to the server, even if
> > > > authorizing were before set.
> > > > ------------------------------------------------
> > > > Thomas Wegner

> > > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > > news:3b2bec10_1@dnews...
> > > > Hello,

> > > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > > the OnProxyAuthorization-Event will not fire. On GET are no
problems.
> > > > ------------------------------------------------
> > > > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


If the Propertys for username and password is set,
only should a connection with these be structured
and only, if this is failed, the Event for authorizing
should be fired!?
------------------------------------------------
Thomas Wegner

"Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
news:3b2c7838$1_1@dnews...

Quote
> On Indy 8.0 and 8.1 from the Website, i can,
> if i know, simply set once the propertys for Username/
> Password (WWW- and Proxy-Authentication) and it
> will work every time. In the new version of the web page,
> will with each connection for the Authorisation asked and
> it must a second authorized connection with the variables
> of the Event be structured This increases substantially the Traffic
> ------------------------------------------------
> Thomas Wegner

> "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> news:3b2c6b23_2@dnews...
> > Which version you are using?

> > If you are using Indy 8.1 get the latest source code. I think I foudn
the
> > problem and it's been fixed.

> > Regarding your second question.  The reason for doing the connection
twice
> > is that I the HTTP component has to know that there is a proxy that
> requers
> > authentication. After getting 407 response it firest the OnAuthorization
> > event and then uses the information provided as username and password. I
> > will think more on this problem but this code is still in development
and
> > there is more to come

> > Doychin

> > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> news:3b2c6434_2@dnews...
> > > Yes.
> > > ------------------------------------------------
> > > Thomas Wegner

> > > "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> > > news:3b2c6227_2@dnews...
> > > > Are you using Stream as post parameter?

> > > > Doychin

> > > > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> > > news:3b2beec4_1@dnews...
> > > > > Also the:

> > > > > TRequest.Username
> > > > > TRequest.Password
> > > > > TRequest.ProxyUsername
> > > > > TRequest.ProxyPassword

> > > > > Propertys are ignored. WWWAuthentication needs
> > > > > then also 2 times a connection to the server, even if
> > > > > authorizing were before set.
> > > > > ------------------------------------------------
> > > > > Thomas Wegner

> > > > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > > > news:3b2bec10_1@dnews...
> > > > > Hello,

> > > > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > > > the OnProxyAuthorization-Event will not fire. On GET are no
> problems.
> > > > > ------------------------------------------------
> > > > > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


The problem always exists!
------------------------------------------------
Thomas Wegner

"Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
news:3b2c6b23_2@dnews...
Which version you are using?

If you are using Indy 8.1 get the latest source code. I think I foudn the
problem and it's been fixed.

Regarding your second question.  The reason for doing the connection twice
is that I the HTTP component has to know that there is a proxy that requers
authentication. After getting 407 response it firest the OnAuthorization
event and then uses the information provided as username and password. I
will think more on this problem but this code is still in development and
there is more to come

Doychin

Quote
"Thomas Wegner" <weg...@d-b-c.de> wrote in message news:3b2c6434_2@dnews...
> Yes.
> ------------------------------------------------
> Thomas Wegner

> "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> news:3b2c6227_2@dnews...
> > Are you using Stream as post parameter?

> > Doychin

> > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> news:3b2beec4_1@dnews...
> > > Also the:

> > > TRequest.Username
> > > TRequest.Password
> > > TRequest.ProxyUsername
> > > TRequest.ProxyPassword

> > > Propertys are ignored. WWWAuthentication needs
> > > then also 2 times a connection to the server, even if
> > > authorizing were before set.
> > > ------------------------------------------------
> > > Thomas Wegner

> > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > news:3b2bec10_1@dnews...
> > > Hello,

> > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > the OnProxyAuthorization-Event will not fire. On GET are no problems.
> > > ------------------------------------------------
> > > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


In the new today version, the Request-Params
for Authentication and ProxyAuthentication will
use, but only when the Event is assigned!? In Indy
8.0 this not needed.
------------------------------------------------
Thomas Wegner

"Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
news:3b2c6b23_2@dnews...
Which version you are using?

If you are using Indy 8.1 get the latest source code. I think I foudn the
problem and it's been fixed.

Regarding your second question.  The reason for doing the connection twice
is that I the HTTP component has to know that there is a proxy that requers
authentication. After getting 407 response it firest the OnAuthorization
event and then uses the information provided as username and password. I
will think more on this problem but this code is still in development and
there is more to come

Doychin

Quote
"Thomas Wegner" <weg...@d-b-c.de> wrote in message news:3b2c6434_2@dnews...
> Yes.
> ------------------------------------------------
> Thomas Wegner

> "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> news:3b2c6227_2@dnews...
> > Are you using Stream as post parameter?

> > Doychin

> > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> news:3b2beec4_1@dnews...
> > > Also the:

> > > TRequest.Username
> > > TRequest.Password
> > > TRequest.ProxyUsername
> > > TRequest.ProxyPassword

> > > Propertys are ignored. WWWAuthentication needs
> > > then also 2 times a connection to the server, even if
> > > authorizing were before set.
> > > ------------------------------------------------
> > > Thomas Wegner

> > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > news:3b2bec10_1@dnews...
> > > Hello,

> > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > the OnProxyAuthorization-Event will not fire. On GET are no problems.
> > > ------------------------------------------------
> > > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


Is there any demo for use TIdAuthentication/TIdBasicAuthentication?
------------------------------------------------
Thomas Wegner

"Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
news:3b2c6b23_2@dnews...
Which version you are using?

If you are using Indy 8.1 get the latest source code. I think I foudn the
problem and it's been fixed.

Regarding your second question.  The reason for doing the connection twice
is that I the HTTP component has to know that there is a proxy that requers
authentication. After getting 407 response it firest the OnAuthorization
event and then uses the information provided as username and password. I
will think more on this problem but this code is still in development and
there is more to come

Doychin

Quote
"Thomas Wegner" <weg...@d-b-c.de> wrote in message news:3b2c6434_2@dnews...
> Yes.
> ------------------------------------------------
> Thomas Wegner

> "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> news:3b2c6227_2@dnews...
> > Are you using Stream as post parameter?

> > Doychin

> > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> news:3b2beec4_1@dnews...
> > > Also the:

> > > TRequest.Username
> > > TRequest.Password
> > > TRequest.ProxyUsername
> > > TRequest.ProxyPassword

> > > Propertys are ignored. WWWAuthentication needs
> > > then also 2 times a connection to the server, even if
> > > authorizing were before set.
> > > ------------------------------------------------
> > > Thomas Wegner

> > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > news:3b2bec10_1@dnews...
> > > Hello,

> > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > the OnProxyAuthorization-Event will not fire. On GET are no problems.
> > > ------------------------------------------------
> > > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


It is not verry difficult to use them. The main reason to provide this
mechanism of doing authtentication was to allow the user programs to provide
their own authtentication mechanisms. You can check the source code of the
Basic and NTLM authtentications.

By default HTTP component supports only Basic Authtentication. In order to
use NTLM you have add the unit in your uses clause and when the server
supports NTLM it will be used.

Doychin
doyc...@dsoft-bg.com

Quote
"Thomas Wegner" <weg...@d-b-c.de> wrote in message news:3b2e3be9_2@dnews...
> Is there any demo for use TIdAuthentication/TIdBasicAuthentication?
> ------------------------------------------------
> Thomas Wegner

> "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> news:3b2c6b23_2@dnews...
> Which version you are using?

> If you are using Indy 8.1 get the latest source code. I think I foudn the
> problem and it's been fixed.

> Regarding your second question.  The reason for doing the connection twice
> is that I the HTTP component has to know that there is a proxy that
requers
> authentication. After getting 407 response it firest the OnAuthorization
> event and then uses the information provided as username and password. I
> will think more on this problem but this code is still in development and
> there is more to come

> Doychin

> "Thomas Wegner" <weg...@d-b-c.de> wrote in message

news:3b2c6434_2@dnews...

- Show quoted text -

Quote
> > Yes.
> > ------------------------------------------------
> > Thomas Wegner

> > "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> > news:3b2c6227_2@dnews...
> > > Are you using Stream as post parameter?

> > > Doychin

> > > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> > news:3b2beec4_1@dnews...
> > > > Also the:

> > > > TRequest.Username
> > > > TRequest.Password
> > > > TRequest.ProxyUsername
> > > > TRequest.ProxyPassword

> > > > Propertys are ignored. WWWAuthentication needs
> > > > then also 2 times a connection to the server, even if
> > > > authorizing were before set.
> > > > ------------------------------------------------
> > > > Thomas Wegner

> > > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > > news:3b2bec10_1@dnews...
> > > > Hello,

> > > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > > the OnProxyAuthorization-Event will not fire. On GET are no
problems.
> > > > ------------------------------------------------
> > > > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


I will use this code:

...
        Auth := TIdAuthentication.Create;
        Auth.Username := 'username';
        Auth.Password := 'password';
        IdHttp1.Request.Authentication := Auth;
...

The IdHttp1.Get will failed with an "abstract error"!

------------------------------------------------
Thomas Wegner

"Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
news:3b2e42f9_1@dnews...
It is not verry difficult to use them. The main reason to provide this
mechanism of doing authtentication was to allow the user programs to provide
their own authtentication mechanisms. You can check the source code of the
Basic and NTLM authtentications.

By default HTTP component supports only Basic Authtentication. In order to
use NTLM you have add the unit in your uses clause and when the server
supports NTLM it will be used.

Doychin
doyc...@dsoft-bg.com

Quote
"Thomas Wegner" <weg...@d-b-c.de> wrote in message news:3b2e3be9_2@dnews...
> Is there any demo for use TIdAuthentication/TIdBasicAuthentication?
> ------------------------------------------------
> Thomas Wegner

> "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> news:3b2c6b23_2@dnews...
> Which version you are using?

> If you are using Indy 8.1 get the latest source code. I think I foudn the
> problem and it's been fixed.

> Regarding your second question.  The reason for doing the connection twice
> is that I the HTTP component has to know that there is a proxy that
requers
> authentication. After getting 407 response it firest the OnAuthorization
> event and then uses the information provided as username and password. I
> will think more on this problem but this code is still in development and
> there is more to come

> Doychin

> "Thomas Wegner" <weg...@d-b-c.de> wrote in message

news:3b2c6434_2@dnews...

- Show quoted text -

Quote
> > Yes.
> > ------------------------------------------------
> > Thomas Wegner

> > "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> > news:3b2c6227_2@dnews...
> > > Are you using Stream as post parameter?

> > > Doychin

> > > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> > news:3b2beec4_1@dnews...
> > > > Also the:

> > > > TRequest.Username
> > > > TRequest.Password
> > > > TRequest.ProxyUsername
> > > > TRequest.ProxyPassword

> > > > Propertys are ignored. WWWAuthentication needs
> > > > then also 2 times a connection to the server, even if
> > > > authorizing were before set.
> > > > ------------------------------------------------
> > > > Thomas Wegner

> > > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > > news:3b2bec10_1@dnews...
> > > > Hello,

> > > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > > the OnProxyAuthorization-Event will not fire. On GET are no
problems.
> > > > ------------------------------------------------
> > > > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


Yes.  becouse TIdAuthtentication is the base clas. Your own atuthentcation
class should descend from TIdAuthtentiction.

If you want to initialise Authentication property you should create
TIdBasicAuthentication.

All this is done by the HTTP component after checking which authtentication
method is supported by the server by checking the response of the first
request.

Doychin

Quote
"Thomas Wegner" <weg...@d-b-c.de> wrote in message

news:3b2e44df$1_2@dnews...
Quote
> I will use this code:

> ...
>         Auth := TIdAuthentication.Create;
>         Auth.Username := 'username';
>         Auth.Password := 'password';
>         IdHttp1.Request.Authentication := Auth;
> ...

> The IdHttp1.Get will failed with an "abstract error"!

> ------------------------------------------------
> Thomas Wegner

> "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> news:3b2e42f9_1@dnews...
> It is not verry difficult to use them. The main reason to provide this
> mechanism of doing authtentication was to allow the user programs to
provide
> their own authtentication mechanisms. You can check the source code of the
> Basic and NTLM authtentications.

> By default HTTP component supports only Basic Authtentication. In order to
> use NTLM you have add the unit in your uses clause and when the server
> supports NTLM it will be used.

> Doychin
> doyc...@dsoft-bg.com

> "Thomas Wegner" <weg...@d-b-c.de> wrote in message

news:3b2e3be9_2@dnews...

- Show quoted text -

Quote
> > Is there any demo for use TIdAuthentication/TIdBasicAuthentication?
> > ------------------------------------------------
> > Thomas Wegner

> > "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> > news:3b2c6b23_2@dnews...
> > Which version you are using?

> > If you are using Indy 8.1 get the latest source code. I think I foudn
the
> > problem and it's been fixed.

> > Regarding your second question.  The reason for doing the connection
twice
> > is that I the HTTP component has to know that there is a proxy that
> requers
> > authentication. After getting 407 response it firest the OnAuthorization
> > event and then uses the information provided as username and password. I
> > will think more on this problem but this code is still in development
and
> > there is more to come

> > Doychin

> > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> news:3b2c6434_2@dnews...
> > > Yes.
> > > ------------------------------------------------
> > > Thomas Wegner

> > > "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> > > news:3b2c6227_2@dnews...
> > > > Are you using Stream as post parameter?

> > > > Doychin

> > > > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> > > news:3b2beec4_1@dnews...
> > > > > Also the:

> > > > > TRequest.Username
> > > > > TRequest.Password
> > > > > TRequest.ProxyUsername
> > > > > TRequest.ProxyPassword

> > > > > Propertys are ignored. WWWAuthentication needs
> > > > > then also 2 times a connection to the server, even if
> > > > > authorizing were before set.
> > > > > ------------------------------------------------
> > > > > Thomas Wegner

> > > > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > > > news:3b2bec10_1@dnews...
> > > > > Hello,

> > > > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > > > the OnProxyAuthorization-Event will not fire. On GET are no
> problems.
> > > > > ------------------------------------------------
> > > > > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


I found all my problems in TIdHeaderInfo.SetHeaders
Can't they make that compatible to old version like:

    if Assigned(Authentication) then begin
      S := Authentication.Authentication;
      if Length(S) > 0 then begin
        Add('Authorization: ' + S);
      end;
    end else begin
      if Length(FUsername) > 0 then begin
        Add('Authorization: Basic ' {do not localize}
         + TIdEncoderMIME.EncodeString(FUsername + ':' + FPassword));
      end;
    end;

The new method is preferred thereby. Then all are
completed and many different possibly also my
problems in the case of the conversion!?
------------------------------------------------
Thomas Wegner

"Doychin Bondzhev" <doyc...@dsoft-bg.com> schrieb im Newsbeitrag
news:3b2e4cd6_2@dnews...
Yes.  becouse TIdAuthtentication is the base clas. Your own atuthentcation
class should descend from TIdAuthtentiction.

If you want to initialise Authentication property you should create
TIdBasicAuthentication.

All this is done by the HTTP component after checking which authtentication
method is supported by the server by checking the response of the first
request.

Doychin

Quote
"Thomas Wegner" <weg...@d-b-c.de> wrote in message

news:3b2e44df$1_2@dnews...
Quote
> I will use this code:

> ...
>         Auth := TIdAuthentication.Create;
>         Auth.Username := 'username';
>         Auth.Password := 'password';
>         IdHttp1.Request.Authentication := Auth;
> ...

> The IdHttp1.Get will failed with an "abstract error"!

> ------------------------------------------------
> Thomas Wegner

> "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> news:3b2e42f9_1@dnews...
> It is not verry difficult to use them. The main reason to provide this
> mechanism of doing authtentication was to allow the user programs to
provide
> their own authtentication mechanisms. You can check the source code of the
> Basic and NTLM authtentications.

> By default HTTP component supports only Basic Authtentication. In order to
> use NTLM you have add the unit in your uses clause and when the server
> supports NTLM it will be used.

> Doychin
> doyc...@dsoft-bg.com

> "Thomas Wegner" <weg...@d-b-c.de> wrote in message

news:3b2e3be9_2@dnews...

- Show quoted text -

Quote
> > Is there any demo for use TIdAuthentication/TIdBasicAuthentication?
> > ------------------------------------------------
> > Thomas Wegner

> > "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> > news:3b2c6b23_2@dnews...
> > Which version you are using?

> > If you are using Indy 8.1 get the latest source code. I think I foudn
the
> > problem and it's been fixed.

> > Regarding your second question.  The reason for doing the connection
twice
> > is that I the HTTP component has to know that there is a proxy that
> requers
> > authentication. After getting 407 response it firest the OnAuthorization
> > event and then uses the information provided as username and password. I
> > will think more on this problem but this code is still in development
and
> > there is more to come

> > Doychin

> > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> news:3b2c6434_2@dnews...
> > > Yes.
> > > ------------------------------------------------
> > > Thomas Wegner

> > > "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> > > news:3b2c6227_2@dnews...
> > > > Are you using Stream as post parameter?

> > > > Doychin

> > > > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> > > news:3b2beec4_1@dnews...
> > > > > Also the:

> > > > > TRequest.Username
> > > > > TRequest.Password
> > > > > TRequest.ProxyUsername
> > > > > TRequest.ProxyPassword

> > > > > Propertys are ignored. WWWAuthentication needs
> > > > > then also 2 times a connection to the server, even if
> > > > > authorizing were before set.
> > > > > ------------------------------------------------
> > > > > Thomas Wegner

> > > > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > > > news:3b2bec10_1@dnews...
> > > > > Hello,

> > > > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > > > the OnProxyAuthorization-Event will not fire. On GET are no
> problems.
> > > > > ------------------------------------------------
> > > > > Thomas Wegner

Re:TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST


Thanks for the new files. WWWAuthenticate is
now running fine! And the same with ProxyAuthentication?
------------------------------------------------
Thomas Wegner

"Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
news:3b2e57db_1@dnews...
I found all my problems in TIdHeaderInfo.SetHeaders
Can't they make that compatible to old version like:

    if Assigned(Authentication) then begin
      S := Authentication.Authentication;
      if Length(S) > 0 then begin
        Add('Authorization: ' + S);
      end;
    end else begin
      if Length(FUsername) > 0 then begin
        Add('Authorization: Basic ' {do not localize}
         + TIdEncoderMIME.EncodeString(FUsername + ':' + FPassword));
      end;
    end;

The new method is preferred thereby. Then all are
completed and many different possibly also my
problems in the case of the conversion!?
------------------------------------------------
Thomas Wegner

"Doychin Bondzhev" <doyc...@dsoft-bg.com> schrieb im Newsbeitrag
news:3b2e4cd6_2@dnews...
Yes.  becouse TIdAuthtentication is the base clas. Your own atuthentcation
class should descend from TIdAuthtentiction.

If you want to initialise Authentication property you should create
TIdBasicAuthentication.

All this is done by the HTTP component after checking which authtentication
method is supported by the server by checking the response of the first
request.

Doychin

Quote
"Thomas Wegner" <weg...@d-b-c.de> wrote in message

news:3b2e44df$1_2@dnews...
Quote
> I will use this code:

> ...
>         Auth := TIdAuthentication.Create;
>         Auth.Username := 'username';
>         Auth.Password := 'password';
>         IdHttp1.Request.Authentication := Auth;
> ...

> The IdHttp1.Get will failed with an "abstract error"!

> ------------------------------------------------
> Thomas Wegner

> "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> news:3b2e42f9_1@dnews...
> It is not verry difficult to use them. The main reason to provide this
> mechanism of doing authtentication was to allow the user programs to
provide
> their own authtentication mechanisms. You can check the source code of the
> Basic and NTLM authtentications.

> By default HTTP component supports only Basic Authtentication. In order to
> use NTLM you have add the unit in your uses clause and when the server
> supports NTLM it will be used.

> Doychin
> doyc...@dsoft-bg.com

> "Thomas Wegner" <weg...@d-b-c.de> wrote in message

news:3b2e3be9_2@dnews...

- Show quoted text -

Quote
> > Is there any demo for use TIdAuthentication/TIdBasicAuthentication?
> > ------------------------------------------------
> > Thomas Wegner

> > "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> > news:3b2c6b23_2@dnews...
> > Which version you are using?

> > If you are using Indy 8.1 get the latest source code. I think I foudn
the
> > problem and it's been fixed.

> > Regarding your second question.  The reason for doing the connection
twice
> > is that I the HTTP component has to know that there is a proxy that
> requers
> > authentication. After getting 407 response it firest the OnAuthorization
> > event and then uses the information provided as username and password. I
> > will think more on this problem but this code is still in development
and
> > there is more to come

> > Doychin

> > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> news:3b2c6434_2@dnews...
> > > Yes.
> > > ------------------------------------------------
> > > Thomas Wegner

> > > "Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
> > > news:3b2c6227_2@dnews...
> > > > Are you using Stream as post parameter?

> > > > Doychin

> > > > "Thomas Wegner" <weg...@d-b-c.de> wrote in message
> > > news:3b2beec4_1@dnews...
> > > > > Also the:

> > > > > TRequest.Username
> > > > > TRequest.Password
> > > > > TRequest.ProxyUsername
> > > > > TRequest.ProxyPassword

> > > > > Propertys are ignored. WWWAuthentication needs
> > > > > then also 2 times a connection to the server, even if
> > > > > authorizing were before set.
> > > > > ------------------------------------------------
> > > > > Thomas Wegner

> > > > > "Thomas Wegner" <weg...@d-b-c.de> schrieb im Newsbeitrag
> > > > > news:3b2bec10_1@dnews...
> > > > > Hello,

> > > > > with TIdHTTP 8.1 (ftp) Problems with ProxyAuthentication on POST,
> > > > > the OnProxyAuthorization-Event will not fire. On GET are no
> problems.
> > > > > ------------------------------------------------
> > > > > Thomas Wegner

Go to page: [1] [2]

Other Threads