How can I get browser authentication popup?

25,273

Solution 1

This popup is part of the HTTP-Authentication. In order to get it, you need to enable it in your web server. As Wikipedia puts it:

When the server wants the user agent to authenticate itself towards the server, it can send a request for authentication.

This request should be sent using the HTTP 401 Not Authorized response code containing a WWW-Authenticate HTTP header.

The WWW-Authenticate header for basic authentication (used most often) is constructed as following: WWW-Authenticate: Basicrealm="insert realm"

Solution 2

That type of window pops up when a web server responds to a request by returning an "Unauthorized" (401) status code. You'd have to tell the server to send that type of response in order to trigger the popup.

Share:
25,273

Related videos on Youtube

saplingPro
Author by

saplingPro

I love to write code and love to be known as a programmer. I try very hard to be creative. I am a hard working man ! I don't know where i am heading and don't know where i will be :(

Updated on July 09, 2022

Comments

  • saplingPro
    saplingPro almost 2 years

    Can anyone tell me, how can I get this browser authentication window ?

    enter image description here

  • saplingPro
    saplingPro about 10 years
    after enabling it, what code will i have to write ?
  • fnisi
    fnisi almost 4 years
    I think WWW-Authenticate: Basicrealm="insert realm" shoule be WWW-Authenticate: Basic realm="insert realm"

Related