|Subject:||Re: HTTPServer Authentication|
|Posted by:||Remy Lebeau \(TeamB\) (email@example.com)|
|Date:||Mon, 17 Nov 2008|
"Walters" <amit_walt…@yahoo.co.in> wrote in message
> I am trying to make a HTTP proxy server in which all other feature
> is working but I want to authenticate by user name and password
> (basic authentication)
TIdHTTPProxyServer does not natively support that.
> how I can popup login box on the client side to fill and how can I
> get it back before sending web page requested by client
The closest you can get is to use TIdHTTPProxyServer's OnHTTPBeforeCommand
event to validate whether the client contains the needed credentials, and if
not then send back a properly formatted 407 reply and raise an exception so
TIdHTTPProxyServer does not finish connecting to the target server.
Otherwise, strip out the credentials from the
TIdHTTPProxyServerContext.Headers property so they are not passed on to the
next server (unless that is what you want). You will have to implement all
of the actual authentication processing manually, though.
Remy Lebeau (TeamB)
HTTPServer Authentication posted by Walters on Mon, 17 Nov 2008