How can I get browser authentication popup?
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.
Related videos on Youtube
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, 2022Comments
-
saplingPro almost 2 years
Can anyone tell me, how can I get this browser authentication window ?
-
saplingPro about 10 yearsafter enabling it, what code will i have to write ?
-
fnisi almost 4 yearsI think
WWW-Authenticate: Basicrealm="insert realm"
shoule beWWW-Authenticate: Basic realm="insert realm"