Class X509AuthServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
net.shibboleth.idp.authn.impl.X509AuthServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class X509AuthServlet extends javax.servlet.http.HttpServlet
Servlet compatible with the ExternalAuthentication interface that extracts and validates an X.509 client certificate for user authentication.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial UUID.
      See Also:
    • TRUST_ENGINE_PARAM

      @Nonnull @NotEmpty private static final String TRUST_ENGINE_PARAM
      Init parameter identifying optional TrustEngine bean name.
      See Also:
    • SAVECERT_ENGINE_PARAM

      @Nonnull @NotEmpty private static final String SAVECERT_ENGINE_PARAM
      Init parameter controlling certificate preservation.
      See Also:
    • PASSTHROUGH_PARAM

      @Nonnull @NotEmpty private static final String PASSTHROUGH_PARAM
      Parameter/cookie for bypassing prompt page.
      See Also:
    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • trustEngine

      @Nullable private TrustEngine<? super X509Credential> trustEngine
      Trust engine.
    • saveCertificateToCredentialSet

      private boolean saveCertificateToCredentialSet
      Whether to save the certificate to the Java Subject's public credentials.
  • Constructor Details

    • X509AuthServlet

      public X509AuthServlet()
      Constructor.
  • Method Details

    • setTrustEngine

      public void setTrustEngine(@Nullable TrustEngine<? super X509Credential> tm)
      Set the TrustEngine to use.
      Parameters:
      tm - trust engine to use
    • setSaveCertificateToCredentialSet

      public void setSaveCertificateToCredentialSet(boolean flag)
      Set whether to save the certificate in the Java Subject's public credentials.

      Defaults to true

      Parameters:
      flag - flag to set
      Since:
      4.1.0
    • init

      public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Servlet
      Overrides:
      init in class javax.servlet.GenericServlet
      Throws:
      javax.servlet.ServletException
    • service

      protected void service(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse) throws javax.servlet.ServletException, IOException
      Overrides:
      service in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException