- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An observer being notified by incoming HTTP Basic-Authentication requests
which might have been registered via
BasicAuthObservable.onBasicAuthRequest(BasicAuthObserver)
possibly
using lambda syntax.-
Method Summary
Modifier and TypeMethodDescriptiononBasicAuthRequest
(InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, HttpMethod aHttpMethod, String aLocator, BasicAuthCredentials aCredentials, String aRealm) Invoked upon an incoming HTTP Basic-Authentication requests.
-
Method Details
-
onBasicAuthRequest
BasicAuthResponse onBasicAuthRequest(InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, HttpMethod aHttpMethod, String aLocator, BasicAuthCredentials aCredentials, String aRealm) Invoked upon an incoming HTTP Basic-Authentication requests. The user name and the password (in case being provided by the client) may be accepted or rejected by returningBasicAuthResponse.BASIC_AUTH_SUCCESS
ofBasicAuthResponse.BASIC_AUTH_FAILURE
.- Parameters:
aLocalAddress
- TheInetSocketAddress
of the receiver of the request.aRemoteAddress
- The remote client'sInetSocketAddress
.aHttpMethod
- The HTTP-Request method involved in the basic authentication request.aLocator
- The locator of the request.aCredentials
- The name for which to grant access.aRealm
- The realm to which this request belongs.- Returns:
BasicAuthResponse.BASIC_AUTH_SUCCESS
in case HTTP basic authentication (user and password) is accepted,BasicAuthResponse.BASIC_AUTH_FAILURE
if HTTP basic authentication (user and password) is rejected.
-