com.ibm.di.api
Class APIAuthenticator

java.lang.Object
  extended by com.ibm.di.api.APIAuthenticator

public class APIAuthenticator
extends Object

This class is used to execute a custom, user-defined script that will take care for authentication of the users.
The user-defined script file path is taken from the Java property with the key name APIEngine.PROP_API_CUSTOM_AUTH


Nested Class Summary
static class APIAuthenticator.Ret
          This class holds the status of the authentication.
static class APIAuthenticator.UserData
          This class is a holder for the user credentials.
 
Constructor Summary
APIAuthenticator(boolean aCustomScriptEnabled, String aScript)
          This constructor creates an instance of the APIAuthenticator class.
 
Method Summary
 void performCustomScriptAuthentication(String aUserName, String aPassword)
          Performs a user authentication using the provided user credentials.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

APIAuthenticator

public APIAuthenticator(boolean aCustomScriptEnabled,
                        String aScript)
                 throws DIException
This constructor creates an instance of the APIAuthenticator class.

Parameters:
aCustomScriptEnabled - if this is false a DIException will be thrown because this class is specialized in custom script authentication and this means that the custom script interpretation should be enabled.
aScript - the script to interpret in order to authenticate the users.
Throws:
DIException - if the custom script authentication is disabled
Method Detail

performCustomScriptAuthentication

public void performCustomScriptAuthentication(String aUserName,
                                              String aPassword)
                                       throws DIException
Performs a user authentication using the provided user credentials.

Parameters:
aUserName - the user name used for the authentication.
aPassword - the user password used for the authentication.
Throws:
DIException - if the custom script authentication is disabled.
AuthenticationException - if the user cannot be authenticated.