public TokenTypeBaseParams(int hotpTotalDigits, int hotpOffSet, int hotpValidationWindow, long hotpMovingFactorDrift, TokenSeedType tokenSeedType, TokenMovingFactorType tokenMovingFactorType, long hotpValidationWindow4Sync, string tokenTypeBaseParamsID, int challengeRequestValidUntil) { this._TokenTypeBaseParamsID = tokenTypeBaseParamsID; this._hotpTotalDigits = hotpTotalDigits; this._hotpOffSet = hotpOffSet; this._hotpValidationWindow = hotpValidationWindow; this._hotpMovingFactorDrift = hotpMovingFactorDrift; this._tokenSeedType = tokenSeedType; this._tokenMovingFactorType = tokenMovingFactorType; this._hotpValidationWindow4Sync = hotpValidationWindow4Sync; this._tokenChallengeRequestValidUntil = challengeRequestValidUntil; }
public OperationResult AfterChallengeRequest(string applicationUser, string tokenID, string baseNotifyMessage, TokenMovingFactorType tokenMovingFactorType, TokenSeedType tokenSeedType) { return OperationResult.Success; }
public AutenticationStatus AfterAutenticate(string applicationUser, string tokenID, string baseNotifyMessage, bool onLoopValidation, string newChallenge, TokenMovingFactorType tokenMovingFactorType, TokenSeedType tokenSeedType) { return AutenticationStatus.Success; }
public OperationResult AfterSynchronize(string applicationUser, string tokenID, string baseNotifyMessage, TokenMovingFactorType tokenMovingFactorType, TokenSeedType tokenSeedType) { return OperationResult.Success; }
public OperationResult AfterStartServerAuthentication(string applicationUser, string tokenID, string baseNotifyMessage, string newPassword, TokenMovingFactorType tokenMovingFactorType, TokenSeedType tokenSeedType) { return OperationResult.Success; }
public OperationResult AfterChallengeRequest(string applicationUser, string tokenID, string baseNotifyMessage, TokenMovingFactorType tokenMovingFactorType, TokenSeedType tokenSeedType) { return(OperationResult.Success); }
public AutenticationStatus AfterAutenticate(string applicationUser, string tokenID, string baseNotifyMessage, bool onLoopValidation, string newChallenge, TokenMovingFactorType tokenMovingFactorType, TokenSeedType tokenSeedType) { return(AutenticationStatus.Success); }
public OperationResult AfterSynchronize(string applicationUser, string tokenID, string baseNotifyMessage, TokenMovingFactorType tokenMovingFactorType, TokenSeedType tokenSeedType) { return(OperationResult.Success); }
public OperationResult AfterStartServerAuthentication(string applicationUser, string tokenID, string baseNotifyMessage, string newPassword, TokenMovingFactorType tokenMovingFactorType, TokenSeedType tokenSeedType) { return(OperationResult.Success); }
public OperationResult loadTableWithTokensLot(LoteType loteType, string loteId, string TokenVendorID, TokenMovingFactorType tokenMovingFactorType, out DataTable dataTable) { DataSet _ds = new DataSet(); IDbCommand _cmd = null; OperationResult result; try { base.ConnectionString = DBConnectionString.ExpandSAFCore(); _cmd = base.CreateCommand((loteType == LoteType.SupplierLot) ? "TokenGetByLot" : "TokenGetBySubLot", CommandType.StoredProcedure); _cmd.Parameters.Add(base.AddParameter("@Param0", (byte)tokenMovingFactorType)); _cmd.Parameters.Add(base.AddParameter("@Param1", TokenVendorID)); _cmd.Parameters.Add(base.AddParameter("@Param2", loteId)); base.CreateDataAdapter(_cmd).Fill(_ds); dataTable = _ds.Tables[0]; result = OperationResult.Success; } catch (Exception ex) { dataTable = null; SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.EXCEPTION, "SAFCORE", new string[] { "http://sfexpand.SAFCore.TokensDAO.softfinanca.com/", Assembly.GetExecutingAssembly().FullName.ToString(), ex.ToString() }); result = OperationResult.Error; } finally { if (_cmd != null) { _cmd.Dispose(); } if (_ds != null) { _ds.Dispose(); } base.CloseConnection(); } return(result); }
public OperationResult loadTableWithTokensLot(LoteType loteType, string loteId, string TokenVendorID, TokenMovingFactorType tokenMovingFactorType, out DataTable dataTable) { DataSet _ds = new DataSet(); IDbCommand _cmd = null; OperationResult result; try { base.ConnectionString = DBConnectionString.ExpandSAFCore(); _cmd = base.CreateCommand((loteType == LoteType.SupplierLot) ? "TokenGetByLot" : "TokenGetBySubLot", CommandType.StoredProcedure); _cmd.Parameters.Add(base.AddParameter("@Param0", (byte)tokenMovingFactorType)); _cmd.Parameters.Add(base.AddParameter("@Param1", TokenVendorID)); _cmd.Parameters.Add(base.AddParameter("@Param2", loteId)); base.CreateDataAdapter(_cmd).Fill(_ds); dataTable = _ds.Tables[0]; result = OperationResult.Success; } catch (Exception ex) { dataTable = null; SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.EXCEPTION, "SAFCORE", new string[] { "http://sfexpand.SAFCore.TokensDAO.softfinanca.com/", Assembly.GetExecutingAssembly().FullName.ToString(), ex.ToString() }); result = OperationResult.Error; } finally { if (_cmd != null) { _cmd.Dispose(); } if (_ds != null) { _ds.Dispose(); } base.CloseConnection(); } return result; }
public OperationResult loadTableWithTokensLot(LoteType loteType, string loteId, string TokenVendorID, TokenMovingFactorType tokenMovingFactorType, out DataTable dataTable) { dataTable = null; DataSet dataSet = new DataSet(); IDbCommand dbCommand = null; OperationResult result; try { base.ConnectionString = DBConnectionString.ExpandSAFCore(); dbCommand = base.CreateCommand((loteType == LoteType.SupplierLot) ? "TokenGetByLot" : "TokenGetBySubLot", CommandType.StoredProcedure); dbCommand.Parameters.Add(base.AddParameter("@Param0", (byte)tokenMovingFactorType)); dbCommand.Parameters.Add(base.AddParameter("@Param1", TokenVendorID)); dbCommand.Parameters.Add(base.AddParameter("@Param2", loteId)); base.CreateDataAdapter(dbCommand).Fill(dataSet); dataTable = dataSet.Tables[0]; result = OperationResult.Success; } catch (Exception ex) { LOGGER.Write(LOGGER.LogCategory.ERROR, "SF.Expand.SAF.Core.TokensDAO::loadTableWithTokensLot[]" + Environment.NewLine + ex.ToString(), null); result = OperationResult.Error; } finally { if (dbCommand != null) { dbCommand.Dispose(); } if (dataSet != null) { dataSet.Dispose(); } base.CloseConnection(); } return(result); }
public OperationResult AfterStartServerAuthentication(string applicationUser, string tokenID, string baseNotifyMessage, string newPassword, TokenMovingFactorType tokenMovingFactorType, TokenSeedType tokenSeedType) { string[] _arrayNotifMsg = (baseNotifyMessage ?? "").Split(new char[] { '|' }); string[] _params = new string[_arrayNotifMsg.Length - 1]; Array.Copy(_arrayNotifMsg, 1, _params, 0, _params.Length); string notifMsg = ((_arrayNotifMsg[0] ?? "").Length > 1) ? _arrayNotifMsg[0] : SAFConfiguration.readParameterExternal("SMS.TEMPLATE.ON.STARTSERVERAUTH"); notifMsg = string.Format(notifMsg.Replace("{tm}", DateTime.Now.ToShortDateString()).Replace("{dt}", DateTime.Now.ToShortTimeString()), _params); return(SMSSender.Send(applicationUser, tokenID, null, notifMsg)); }
public OperationResult loadTableWithTokensLot(LoteType loteType, string loteId, string TokenVendorID, TokenMovingFactorType tokenMovingFactorType, out DataTable dataTable) { dataTable = null; DataSet dataSet = new DataSet(); IDbCommand dbCommand = null; OperationResult result; try { base.ConnectionString = DBConnectionString.ExpandSAFCore(); dbCommand = base.CreateCommand((loteType == LoteType.SupplierLot) ? "TokenGetByLot" : "TokenGetBySubLot", CommandType.StoredProcedure); dbCommand.Parameters.Add(base.AddParameter("@Param0", (byte)tokenMovingFactorType)); dbCommand.Parameters.Add(base.AddParameter("@Param1", TokenVendorID)); dbCommand.Parameters.Add(base.AddParameter("@Param2", loteId)); base.CreateDataAdapter(dbCommand).Fill(dataSet); dataTable = dataSet.Tables[0]; result = OperationResult.Success; } catch (Exception ex) { LOGGER.Write(LOGGER.LogCategory.ERROR, "SF.Expand.SAF.Core.TokensDAO::loadTableWithTokensLot[]" + Environment.NewLine + ex.ToString(), null); result = OperationResult.Error; } finally { if (dbCommand != null) { dbCommand.Dispose(); } if (dataSet != null) { dataSet.Dispose(); } base.CloseConnection(); } return result; }
public OperationResult AfterStartServerAuthentication(string applicationUser, string tokenID, string baseNotifyMessage, string newPassword, TokenMovingFactorType tokenMovingFactorType, TokenSeedType tokenSeedType) { string[] _arrayNotifMsg = (baseNotifyMessage ?? "").Split(new char[] { '|' }); string[] _params = new string[_arrayNotifMsg.Length - 1]; Array.Copy(_arrayNotifMsg, 1, _params, 0, _params.Length); string notifMsg = ((_arrayNotifMsg[0] ?? "").Length > 1) ? _arrayNotifMsg[0] : SAFConfiguration.readParameterExternal("SMS.TEMPLATE.ON.STARTSERVERAUTH"); notifMsg = string.Format(notifMsg.Replace("{tm}", DateTime.Now.ToShortDateString()).Replace("{dt}", DateTime.Now.ToShortTimeString()), _params); return SMSSender.Send(applicationUser, tokenID, null, notifMsg); }