When the login() method is called, KonaKart instantiates a class defined by the property LOGIN_INTEGRATION_CLASS . If this property isn't set, the class that is instantiated is com.konakart.bl.LoginIntegrationMgr . If you write a custom class it must implement the interface com.konakart.bl.LoginIntegrationMgrInterface which contains the method:
public int checkCredentials(String emailAddr, String password) throws KKException;
The checkCredentials() method can return the following values:
A negative number in order for the login attempt to fail. The KonaKart login() method will return a null sessionId.
Zero, to signal that this method is not implemented. The KonaKart login() method will perform the credential check.
A positive number for the login attempt to pass. The KonaKart login() will not check credentials, and will log in the customer, returning a valid session id.
A similar mechanism exists for the Admin App. The property is called ADMIN_LOGIN_INTEGRATION_CLASS and if it isn't set then the class that is instantiated is com.konakartadmin.bl.AdminLoginIntegrationMgr . If you write a custom class it must implement the interface com.konakartadmin.bl.AdminLoginIntegrationMgrInterface which contains the method as described above.
public int checkCredentials(String emailAddr, String password) throws KKAdminException;
This mechanism is a useful generic way to implement a Single Sign On system or just to implement your own custom credentials checking..
The LOGIN_INTEGRATION_CLASS and ADMIN_LOGIN_INTEGRATION_CLASS properties can be edited in the Configuration>>Security and Auditing section of the Admin App.