Class ServiceAuthenticationServletContextHelper
java.lang.Object
org.osgi.service.servlet.context.ServletContextHelper
org.jolokia.server.core.osgi.security.DefaultServletContextHelper
org.jolokia.server.core.osgi.security.ServiceAuthenticationServletContextHelper
Authentication context helper based on an Authenticator Service.
-
Field Summary
Fields inherited from class org.osgi.service.servlet.context.ServletContextHelper
AUTHENTICATION_TYPE, AUTHORIZATION, REMOTE_USER -
Constructor Summary
ConstructorsConstructorDescriptionServiceAuthenticationServletContextHelper(org.osgi.framework.BundleContext bundleContext, String authMode) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanhandleSecurity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) static booleanshouldBeUsed(String authMode) Check whether for the given authmode an instance of this context should be used (i.e.Methods inherited from class org.jolokia.server.core.osgi.security.DefaultServletContextHelper
getResource, getResourcePathsMethods inherited from class org.osgi.service.servlet.context.ServletContextHelper
finishSecurity, getMimeType, getRealPath
-
Constructor Details
-
ServiceAuthenticationServletContextHelper
public ServiceAuthenticationServletContextHelper(org.osgi.framework.BundleContext bundleContext, String authMode)
-
-
Method Details
-
handleSecurity
public boolean handleSecurity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException - Overrides:
handleSecurityin classorg.osgi.service.servlet.context.ServletContextHelper- Throws:
IOException
-
close
public void close() -
shouldBeUsed
Check whether for the given authmode an instance of this context should be used (i.e. when the auth-mode is "service-any" or "service-all"- Parameters:
authMode- authmode to check- Returns:
- true if this context should be used for the agent, false otherwise
-