找到你要的答案

Q:How can I get browser authentication popup?

Q:我怎么能让浏览器认证弹出?

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

谁能告诉我,我怎样才能得到这个浏览器认证窗口?

answer1: 回答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"

这个弹出的是HTTP认证的一部分。为了获得它,需要在web服务器中启用它。正如维基百科所说:

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"

answer2: 回答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.

当Web服务器返回一个未经授权的(401)状态代码时,该类型的窗口会弹出。你要告诉服务器发送的响应,为了触发弹出式。

answer3: 回答3:

The authentication you are talking is called Basic Authentication in web based application where browser popup will be used to get user credentials.

Which Java Application Server you are using ?

To know more about Basic Authentication look at this page

你说话的认证称为基本身份验证的基于Web的应用程序在浏览器窗口将被用来获取用户凭据。

java应用服务器,你使用的是什么?

要了解更多关于基本身份验证的页面

http  authentication  browser  http-headers  basic-authentication