Sample Code 1

Note:

Your custom authentication code should not use log4j for error logging. If the custom authentication code that you used in a previous release used log4j, you must remove it from the code before using it with this release.

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;

public class CustomAuthenticationImpl implements CSSCustomAuthenticationIF {
      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:
                //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:

  • Context: A map that contains key-value pair of locale information

  • User name: An identifier that uniquely identifies the user to the user directory where the custom module authenticates the user. The user enters the value of this parameter while logging into an Oracle Enterprise Performance Management System component.

  • Password: The password set for the user in the user directory where the custom module authenticates the user. The user enters the value of this parameter while logging into an EPM System component.