Class RestAuthenticationHandler

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class RestAuthenticationHandler
    extends Object
    implements javax.servlet.Filter
    Filter that takes a request, checks if there is a "authKey" header and verifies that its valid
    • Constructor Detail

      • RestAuthenticationHandler

        public RestAuthenticationHandler()
    • Method Detail

      • init

        public void init​(javax.servlet.FilterConfig config)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Filter
        Throws:
        javax.servlet.ServletException
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Filter
      • doFilter

        public void doFilter​(javax.servlet.ServletRequest request,
                             javax.servlet.ServletResponse response,
                             javax.servlet.FilterChain chain)
                      throws javax.servlet.ServletException,
                             IOException
        Servlet Filter method
        Specified by:
        doFilter in interface javax.servlet.Filter
        Parameters:
        request - Incoming http request
        response - Http Response
        chain - Filter Chain for the request
        Throws:
        javax.servlet.ServletException - thrown when there is a mismatch in the authentication key hash
        IOException - thrown if something goes wrong.