EX
- See HttpAuthenticationServlett(String, UserNamePasswordPredicate)
public class HttpAuthenticationServlett<EX extends Exception> extends AbstractServlett
Servlett
that processes the AUTHENTICATION information in the HTTp request, and passes control to the
next servlett iff authentication is successfully completed.Modifier and Type | Class and Description |
---|---|
static interface |
HttpAuthenticationServlett.UserNamePasswordPredicate<EX extends Throwable> |
Constructor and Description |
---|
HttpAuthenticationServlett(String realm,
HttpAuthenticationServlett.UserNamePasswordPredicate<EX> userNamePasswordPredicate) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
handleRequest(HttpRequest httpRequest,
de.unkrig.commons.lang.protocol.ConsumerWhichThrows<HttpResponse,IOException> sendProvisionalResponse)
Forwards the HTTP requests it receives to one of
AbstractServlett.get(HttpRequest, ConsumerWhichThrows)
AbstractServlett.head(HttpRequest, ConsumerWhichThrows)
AbstractServlett.post(HttpRequest, ConsumerWhichThrows)
AbstractServlett.put(HttpRequest, ConsumerWhichThrows)
, depending on the HTTP method. |
public HttpAuthenticationServlett(String realm, HttpAuthenticationServlett.UserNamePasswordPredicate<EX> userNamePasswordPredicate)
userNamePasswordPredicate
- Determines whether any given tuple of HttpRequest
, user name and
password is allowed or not@Nullable public HttpResponse handleRequest(HttpRequest httpRequest, de.unkrig.commons.lang.protocol.ConsumerWhichThrows<HttpResponse,IOException> sendProvisionalResponse)
AbstractServlett
handleRequest
in interface Servlett
handleRequest
in class AbstractServlett
httpRequest
- The request to processsendProvisionalResponse
- Consumes any provisional responses, see
RFC 2616: 10 Status
Code Definitions: 10.1 Informational 1xxnull
iff this handler cannot handle the
requestCopyright © 2018 Arno Unkrig. All rights reserved.