Interface AuthenticationHandler


public interface AuthenticationHandler
  • Method Summary

    Modifier and Type
    Method
    Description
    Authentication type String used to match this handler with the auth types configured for a specific context.
    getNormalizedToken(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.codice.ddf.platform.filter.SecurityFilterChain chain, boolean resolve)
    Determine if all the required information exists in the request to generate a token and move on to perform authentication and/or authorization for the requested context.
    handleError(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, org.codice.ddf.platform.filter.SecurityFilterChain chain)
    Called when downstream authentication fails.
  • Method Details

    • getAuthenticationType

      String getAuthenticationType()
      Authentication type String used to match this handler with the auth types configured for a specific context.
      Returns:
      String representing the authentication type
    • getNormalizedToken

      HandlerResult getNormalizedToken(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.codice.ddf.platform.filter.SecurityFilterChain chain, boolean resolve) throws org.codice.ddf.platform.filter.AuthenticationException
      Determine if all the required information exists in the request to generate a token and move on to perform authentication and/or authorization for the requested context. If 'resolve' is set to false and the required information is missing, do not attempt to obtain it and return a status of NO_ACTION. If 'resolve' is set to true and the required information is missing, do whatever it takes to obtain it (redirects, apply your own filters, etc.) and return a status of REDIRECTED. In any case, if the required credentials are present (including the successful conclusion of any redirects, etc.) place the credentials into the HandlerResult and return a status of COMPLETED.
      Parameters:
      request - http request to obtain attributes from and to pass into any local filter chains required
      response - http response to return http responses or redirects
      chain - original filter chain (should not be called from your handler)
      resolve - flag with true implying that credentials should be obtained, false implying return if no credentials are found.
      Returns:
      result containing a status and the credentials to be placed into the http request
      Throws:
      org.codice.ddf.platform.filter.AuthenticationException
    • handleError

      HandlerResult handleError(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, org.codice.ddf.platform.filter.SecurityFilterChain chain) throws org.codice.ddf.platform.filter.AuthenticationException
      Called when downstream authentication fails. Should attempt to re-acquire credentials if appropriate. Returns a status indicating if appropriate action has been taken.
      Parameters:
      servletRequest - htt http response to return http responses or redirects
      Returns:
      result containing a status indicating if further action is necessary
      Throws:
      org.codice.ddf.platform.filter.AuthenticationException