public class BasicAuthenticationHandler extends Object implements HttpHandler
| 限定符和类型 | 字段和说明 |
|---|---|
private PasswordAuthenticator |
authenticator |
private static String |
BASIC_PREFIX |
private String |
realm |
static String |
USERNAME |
| 构造器和说明 |
|---|
BasicAuthenticationHandler(PasswordAuthenticator authenticator) |
BasicAuthenticationHandler(PasswordAuthenticator authenticator,
String realm) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
handleHttpRequest(HttpRequest request,
HttpResponse response,
HttpControl control) |
private void |
needAuthentication(HttpResponse response) |
private final String realm
private final PasswordAuthenticator authenticator
public BasicAuthenticationHandler(PasswordAuthenticator authenticator)
public BasicAuthenticationHandler(PasswordAuthenticator authenticator, String realm)
public void handleHttpRequest(HttpRequest request, HttpResponse response, HttpControl control) throws Exception
handleHttpRequest 在接口中 HttpHandlerExceptionprivate void needAuthentication(HttpResponse response)
Copyright © 2014. All rights reserved.