Class AuthenticationFilter

java.lang.Object
com.mapr.web.security.hadoop.jakartaauth.AuthenticationFilter
All Implemented Interfaces:
jakarta.servlet.Filter

public class AuthenticationFilter extends Object implements jakarta.servlet.Filter
  • Field Details

  • Constructor Details

    • AuthenticationFilter

      public AuthenticationFilter()
  • Method Details

    • init

      public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException
      Specified by:
      init in interface jakarta.servlet.Filter
      Throws:
      jakarta.servlet.ServletException
    • initializeAuthHandler

      protected void initializeAuthHandler(String authHandlerClassName, jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException
      Throws:
      jakarta.servlet.ServletException
    • initializeSecretProvider

      protected void initializeSecretProvider(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException
      Throws:
      jakarta.servlet.ServletException
    • constructSecretProvider

      public static SignerSecretProvider constructSecretProvider(jakarta.servlet.ServletContext ctx, Properties config, boolean disallowFallbackToRandomSecretProvider) throws Exception
      Throws:
      Exception
    • getConfiguration

      protected Properties getConfiguration()
    • getAuthenticationHandler

      protected AuthenticationHandler getAuthenticationHandler()
    • isRandomSecret

      protected boolean isRandomSecret()
    • isCustomSignerSecretProvider

      protected boolean isCustomSignerSecretProvider()
    • getMaxInactiveInterval

      protected long getMaxInactiveInterval()
    • getValidity

      protected long getValidity()
    • getCookieDomain

      protected String getCookieDomain()
    • getCookiePath

      protected String getCookiePath()
    • isCookiePersistent

      protected boolean isCookiePersistent()
    • destroy

      public void destroy()
      Specified by:
      destroy in interface jakarta.servlet.Filter
    • getConfiguration

      protected Properties getConfiguration(String configPrefix, jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException
      Throws:
      jakarta.servlet.ServletException
    • getRequestURL

      protected String getRequestURL(jakarta.servlet.http.HttpServletRequest request)
    • getToken

      protected AuthenticationToken getToken(jakarta.servlet.http.HttpServletRequest request) throws IOException, AuthenticationException
      Throws:
      IOException
      AuthenticationException
    • verifyTokenType

      protected boolean verifyTokenType(AuthenticationHandler handler, AuthenticationToken token)
    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doFilter in interface jakarta.servlet.Filter
      Throws:
      IOException
      jakarta.servlet.ServletException
    • doFilter

      protected void doFilter(jakarta.servlet.FilterChain filterChain, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
      Throws:
      IOException
      jakarta.servlet.ServletException
    • createAuthCookie

      public static void createAuthCookie(String name, jakarta.servlet.http.HttpServletResponse resp, jakarta.servlet.http.HttpServletRequest req, String token, String domain, String path, long expires, boolean isCookiePersistent, boolean isSecure, long jwtExp)
    • getAuthUrl

      public String getAuthUrl()
    • getLogoutUrl

      public String getLogoutUrl()
    • getCookieTokenName

      public String getCookieTokenName()