Sample Code 1

The following code snippet is an empty implementation of the custom module:

package com.hyperion.css.custom;
import java.util.Map;
import com.hyperion.css.CSSCustomAuthenticationIF;
import org.apache.log4j.Logger; // imports Log4j's Logger
  public class CustomAuthenticationImpl 
               implements CSSCustomAuthenticationIF {
    //Get the Logger to log exception or debug information
    //Log information is written to the Shared Services security log 
    static Logger logger=Logger.getLogger 
                         ("com.hyperion.css.custom.CustomAuthenticationImpl");
      public String authenticate(Map context,String userName,
                                 String password) throws Exception{
        try{
          //Custom code to find and authenticate the user goes here.
          //The code should do the following:
          //if authentication succeeds:
                //set authenticationSuccessFlag = true
                //return authenticatedUserName
          // if authentication fails:
                //ensure debug is enabled using logger.isDebugEnabled()
                //log an authentication failure
                //throw authentication exception
        }
        catch (Exception e){
          //Custom code to handle authentication exception goes here
          //Create a new exception, set the root cause
          //Set any custom error message
          //Return the exception to the caller
        }
        return authenticatedUserName;
        }
  }

Input parameters: