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

public class ServiceAuthenticationServletContextHelper extends DefaultServletContextHelper
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

    Constructors
    Constructor
    Description
    ServiceAuthenticationServletContextHelper(org.osgi.framework.BundleContext bundleContext, String authMode)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    boolean
    handleSecurity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    static boolean
    shouldBeUsed(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, getResourcePaths

    Methods inherited from class org.osgi.service.servlet.context.ServletContextHelper

    finishSecurity, getMimeType, getRealPath

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      handleSecurity in class org.osgi.service.servlet.context.ServletContextHelper
      Throws:
      IOException
    • close

      public void close()
    • shouldBeUsed

      public static boolean shouldBeUsed(String authMode)
      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