user2620753
user2620753

Reputation: 21

Can Basic HTTP authentication use a default username?

I have a simple HTTP server that does basic authentication. However, it only supports one username ("Admin") and I need this to show up by default on the Username/Password prompt on the browser. Is this possible with Basic Authentication? How should the Response Header look like?

Upvotes: 2

Views: 2706

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 597560

There is no way for an HTTP server to specify a default username to an HTTP client, in any authentication scheme, and there is no way for an HTTP server to ask an HTTP client to ignore the username field when prompting for credentials. All you can do is configure the HTTP server to ignore usernames (which is a bad idea), and then tell your users not to type them in when prompted.

Upvotes: 3

Related Questions