Search code examples
lighttpd

How to use only one field for webpage authentication (instead of both user and password)


I'm using lighttpd authentication module.

Normally webpage pops out a window, asking for username and password. In my case, there's only one username and it is fixed.

So is there a way to remove the username text field in the popup login window, leave only the password field ?

Don't ask me why we're doing this.


Solution

  • Lighthttpd auth module uses HTTP authentication, described in RFC 2617. Here is how it works:

    • Server sends "401 Auth Reqiured" header to client (browser)
    • Browser asks user for login and password and sends it back to server

    You can not affect the way browser asks user for credentials. So, the answer to you question is no.

    You may use custom auth (not http based, but html-form based) for this task. But I am not sure if lighthttpd suppors it. You may need do some server-side programming for that