Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleMCBSubmodule
public interface MCBSubmodule extends BeanNameAware {
	
	/**
	 * Display the necessary login form.
	 * 
	 * @param servlet
	 * @param request
	 * @param response
	 * @return true if the login form display was handled.
	 * @throws AuthenticationException
	 * @throws LoginException
	 */
    boolean run displayLogin(MCBLoginServlet servlet, HttpServletRequest request, HttpServletResponse response)
    	throws AuthenticationException, LoginException;

    /**
     * Process the login. Validate credentials and return a true/false success status.
     * 
     * @param servlet
     * @param request
     * @param response
     * @return true if the login was successful.
     * @throws AuthenticationException
     * @throws LoginException
     */
    boolean processLogin(MCBLoginServlet servlet, HttpServletRequest request, HttpServletResponse response)
    	throws AuthenticationException, LoginException;

    /**
     * Called during startup to allow any one-time initialization to occur.
     */
    void init();
    
    public String getBeanName();
}

During authentication, the MCB will execute each submodule as configuration dictates. The submodule is expected to perform authentication and report the result back to the MCB. The MCB will then finish the authentication process if the login was successful. If the login was not successful, then the MCB will decide the next step based on configuration.

...