private void Authenticate(HttpRequest request) { AuthenticationResult authenticationResult = BpmonlineCloudEngine.Authenticate(request, UserConnectionSafe); if (!authenticationResult.Success) { LogError(authenticationResult.Message); throw new InvalidCredentialException(authenticationResult.Message); } }
private void Authenticate() { HttpContext httpContext = HttpContextAccessor.GetInstance(); AuthenticationResult authenticationResult = BpmonlineCloudEngine.Authenticate(httpContext.Request, UserConnectionSafe); var enabledMonitoring = (bool)Terrasoft.Core.Configuration.SysSettings.GetValue(UserConnectionSafe, "EnableEmailIndicatorMonitoring"); if (!(authenticationResult.Success && enabledMonitoring)) { throw new WebFaultException <string>(authenticationResult.Message, HttpStatusCode.Forbidden); } }