Class 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:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.slf4j.Logger log
      Class logger.
      private static String PASSTHROUGH_PARAM
      Parameter/cookie for bypassing prompt page.
      private static long serialVersionUID
      Serial UUID.
      private static String TRUST_ENGINE_PARAM
      Init parameter identifying optional TrustEngine bean name.
      private org.opensaml.security.trust.TrustEngine<? super org.opensaml.security.x509.X509Credential> trustEngine
      Trust engine.
    • Constructor Summary

      Constructors 
      Constructor Description
      X509AuthServlet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init​(javax.servlet.ServletConfig config)
      protected void service​(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
      void setTrustEngine​(org.opensaml.security.trust.TrustEngine<? super org.opensaml.security.x509.X509Credential> tm)
      Set the TrustEngine to use.
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
    • Field Detail

      • serialVersionUID

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

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

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

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

        @Nullable
        private org.opensaml.security.trust.TrustEngine<? super org.opensaml.security.x509.X509Credential> trustEngine
        Trust engine.
    • Constructor Detail

      • X509AuthServlet

        public X509AuthServlet()
    • Method Detail

      • setTrustEngine

        public void setTrustEngine​(@Nullable
                                   org.opensaml.security.trust.TrustEngine<? super org.opensaml.security.x509.X509Credential> tm)
        Set the TrustEngine to use.
        Parameters:
        tm - trust engine to use
      • 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