AuthenticationSupport
provides the service API used to implement the HttpContext.handleSecurity
method as defined in the OSGi Http Service specification. Bundles registering servlets and/or resources with custom HttpContext
implementations may implement the handleSecurity
method using this service. The {@link #handleSecurity(HttpServletRequest,HttpServletResponse)} methodimplemented by this service exactly implements the specification of the HttpContext.handleSecurity
method.
A simple implementation of the HttpContext
interface based on this could be (using SCR JavaDoc tags of the Maven SCR Plugin) :
/** @scr.component */ public class MyHttpContext implements HttpContext { /** @scr.reference */ private AuthenticationSupport authSupport; /** @scr.reference */ private MimeTypeService mimeTypes; public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) { return authSupport.handleSecurity(request, response); } public URL getResource(String name) { return null; } public String getMimeType(String name) { return mimeTypes.getMimeType(name); } }
This interface is implemented by this bundle and is not intended to be implemented by client bundles.
|
|
|
|
|
|