Class WebEngineFormAuthenticator

java.lang.Object
org.nuxeo.ecm.webengine.login.WebEngineFormAuthenticator
All Implemented Interfaces:
LoginResponseHandler, NuxeoAuthenticationPlugin

public class WebEngineFormAuthenticator extends Object implements NuxeoAuthenticationPlugin, LoginResponseHandler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    protected String
     
    protected String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    getLoginPathInfo(jakarta.servlet.http.HttpServletRequest request)
    Gets the path info to be used to redirect after login.
    Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.
    handleLoginPrompt(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String baseURL)
    Handles the Login Prompt.
    handleRetrieveIdentity(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse)
    Retrieves user identification information from the request.
    void
    initPlugin(Map<String,String> parameters)
    Initializes the Plugin from parameters set in the XML descriptor.
    static boolean
    isLoginRequest(jakarta.servlet.http.HttpServletRequest request)
     
    needLoginPrompt(jakarta.servlet.http.HttpServletRequest httpRequest)
    Defines if the authentication plugin needs to do a login prompt.
    boolean
    onError(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Handles the login error response.
    boolean
    onSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Handles login success response.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • WebEngineFormAuthenticator

      public WebEngineFormAuthenticator()
  • Method Details

    • handleLoginPrompt

      public Boolean handleLoginPrompt(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String baseURL)
      Description copied from interface: NuxeoAuthenticationPlugin
      Handles the Login Prompt.
      Specified by:
      handleLoginPrompt in interface NuxeoAuthenticationPlugin
      Parameters:
      request - the request
      response - the response
      Returns:
      true if AuthFilter must stop execution (ie: login prompt generated a redirect), false otherwise
    • getLoginPathInfo

      protected String getLoginPathInfo(jakarta.servlet.http.HttpServletRequest request)
      Gets the path info to be used to redirect after login.
    • isLoginRequest

      public static boolean isLoginRequest(jakarta.servlet.http.HttpServletRequest request)
    • handleRetrieveIdentity

      public UserIdentificationInfo handleRetrieveIdentity(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse)
      Description copied from interface: NuxeoAuthenticationPlugin
      Retrieves user identification information from the request.
      Specified by:
      handleRetrieveIdentity in interface NuxeoAuthenticationPlugin
      Parameters:
      httpRequest - the request
      httpResponse - the response
    • needLoginPrompt

      public Boolean needLoginPrompt(jakarta.servlet.http.HttpServletRequest httpRequest)
      Description copied from interface: NuxeoAuthenticationPlugin
      Defines if the authentication plugin needs to do a login prompt.
      Specified by:
      needLoginPrompt in interface NuxeoAuthenticationPlugin
      Returns:
      true if LoginPrompt is used
    • initPlugin

      public void initPlugin(Map<String,String> parameters)
      Description copied from interface: NuxeoAuthenticationPlugin
      Initializes the Plugin from parameters set in the XML descriptor.
      Specified by:
      initPlugin in interface NuxeoAuthenticationPlugin
    • getUnAuthenticatedURLPrefix

      public List<String> getUnAuthenticatedURLPrefix()
      Description copied from interface: NuxeoAuthenticationPlugin
      Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.
      Specified by:
      getUnAuthenticatedURLPrefix in interface NuxeoAuthenticationPlugin
    • onError

      public boolean onError(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Description copied from interface: LoginResponseHandler
      Handles the login error response.
      Specified by:
      onError in interface LoginResponseHandler
      Parameters:
      request - the HTTP request
      response - the HTTP response
      Returns:
      true if error was handled, false otherwise
    • onSuccess

      public boolean onSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Description copied from interface: LoginResponseHandler
      Handles login success response.
      Specified by:
      onSuccess in interface LoginResponseHandler
      Parameters:
      request - the HTTP request
      response - the HTTP response
      Returns:
      true if response was handled, false otherwise