Accelerator's authentication method, AB_FrameworkViewModel.am_ValidateUserAndGetSysEntity(), uses WebAppSettings.config settings in the Accelerator BP Service to determine which authentication service to use: Accelerator's FWUS user table, IBMi user authentication, or Active Directory. This has been a problem when different user interfaces, for example an internal WPF application and an external website, want to use different authentication services. In the past we've needed to deploy the Accelerator BP Service Host twice, with different config settings, talking to the same A4DN database.
Starting in Accelerator 6.3.1.0 the am_ValidateUserAndGetSysEntity() method takes a new optional argument TryAuthTypes. This is a set of Flags that indicate which authentication services to use.
In this code example, an MVC application authenticates using either Active Directory or Accelerator:
var fh = HttpContext.Current.ApplicationInstance.ap_FrameworkHelper(); var retArgs = fh.ap_ViewModel.am_ValidateUserAndGetSysEntity(new AB_ValidateUserInputArgs( Int32.Parse(ConfigurationManager.AppSettings["SystemNumber"]), username, password) { TryAuthTypes = AB_ValidateUserInputArgs.AuthTypes.ActiveDirectory | AB_ValidateUserInputArgs.AuthTypes.Accelerator });
The values for TryAuthTypes are Configured, Accelerator, IBMi, and ActiveDirectory. The default is Configured, which implements the pre-6.3.1.0 behavior. Any other value(s) override the behavior so that each authentication service is tried in turn. The order is fixed: Active Directory, IBMi, then Accelerator. The first one that passes will cause the authentication to succeed.
When using multiple types, the configuration settings which tell the BP service which authentication to use are ignored, but the other settings which enable authentication (eg: Active Directory server url and credentials) are still used.
These changes only impact authentication: determining if the username is an active account and that the password is correct. The rest of the user security system has not been changed in any way.