Atozed Forums
Idhttpserver force Login/password - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Indy (https://www.atozed.com/forums/forum-8.html)
+--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html)
+--- Thread: Idhttpserver force Login/password (/thread-3016.html)



Idhttpserver force Login/password - BartKindt - 02-05-2023

I am writing a IdHttpsServer application, which requires that the connecting web browser login with username and password.

I am not a HTML specialist, but I remember that basic authentication would pop-up a (what looks like) *internal* web browser window where the Login and Password can be entered, after which these are send back to the Server in the 'Basic' authentication format.

So they show up in ARequestInfo.AuthUsername and ARequestInfo.AuthPassword.

How do I 'force' this to happen on the Browser side?  I was looking for a IdHttpsServer option to force this request, but can't find anything; So it must be a special HTML command/webpage to generate this on the browser side?


RE: Idhttpserver force Login/password - KennethTaylor - 06-30-2023

To enforce basic authentication on the browser side, you need to send the appropriate HTTP headers in the server's response. The browser will then handle the authentication process and prompt the user for a username and password.