public class BasicAuthSecuredContext
extends java.lang.Object
implements org.osgi.service.http.HttpContext
Constructor and Description |
---|
BasicAuthSecuredContext(java.net.URL resourceBase,
java.net.URL configFile,
java.lang.String realm)
The constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMimeType(java.lang.String name)
Empty implementation of getMimeType.
|
java.net.URL |
getResource(java.lang.String name)
Get a resource by name
|
boolean |
handleSecurity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This operation handles the authentication request and calls login() to
handle the actual credentials.
|
public BasicAuthSecuredContext(java.net.URL resourceBase, java.net.URL configFile, java.lang.String realm)
resourceBase
- A URL to the resource directory where files and data are
stored for the plugin.configFile
- A URL to the JAAS configuration file where the identity of the
login module is provided.realm
- The HTTP realm used in authentication.public java.lang.String getMimeType(java.lang.String name)
getMimeType
in interface org.osgi.service.http.HttpContext
public java.net.URL getResource(java.lang.String name)
getResource
in interface org.osgi.service.http.HttpContext
public boolean handleSecurity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
handleSecurity
in interface org.osgi.service.http.HttpContext
java.io.IOException