Package org.refcodes.net
Interface BasicAuthObserver
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface BasicAuthObserverAn observer being notified by incoming HTTP Basic-Authentication requests which might have been registered viaBasicAuthObservable.onBasicAuthRequest(BasicAuthObserver)possibly using lambda syntax.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BasicAuthResponseonBasicAuthRequest(java.net.InetSocketAddress aLocalAddress, java.net.InetSocketAddress aRemoteAddress, HttpMethod aHttpMethod, java.lang.String aLocator, BasicAuthCredentials aCredentials, java.lang.String aRealm)Invoked upon an incoming HTTP Basic-Authentication requests.
-
-
-
Method Detail
-
onBasicAuthRequest
BasicAuthResponse onBasicAuthRequest(java.net.InetSocketAddress aLocalAddress, java.net.InetSocketAddress aRemoteAddress, HttpMethod aHttpMethod, java.lang.String aLocator, BasicAuthCredentials aCredentials, java.lang.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_SUCCESSofBasicAuthResponse.BASIC_AUTH_FAILURE.- Parameters:
aLocalAddress- TheInetSocketAddressof 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_SUCCESSin case HTTP basic authentication (user and password) is accepted,BasicAuthResponse.BASIC_AUTH_FAILUREif HTTP basic authentication (user and password) is rejected.
-
-