示例#1
0
        public OperationResult Synchronize(string tokenInternalID, string firstPwd, string secondPwd)
        {
            OperationResult result;

            try
            {
                string          assemb  = new TokensValidatorDAO().ValidatorAssemblyNameByTokenID(tokenInternalID);
                ITokenValidator _tokens = TokenValidatorFactory.LoadAssembly(assemb);
                if (_tokens == null)
                {
                    SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.ERROR, "SAFCORE", new string[]
                    {
                        "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                        "[ITokenValidator]::" + assemb.Trim(),
                        "Invalid or null typename!"
                    });
                    result = OperationResult.Error;
                }
                else
                {
                    result = _tokens.Synchronize(tokenInternalID, firstPwd, secondPwd);
                }
            }
            catch (Exception ex)
            {
                SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.EXCEPTION, "SAFCORE", new string[]
                {
                    "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                    Assembly.GetExecutingAssembly().FullName.ToString(),
                    ex.ToString()
                });
                result = OperationResult.Error;
            }
            return(result);
        }
示例#2
0
        public OperationResult Synchronize(string tokenInternalID, string firstPwd, string secondPwd)
        {
            OperationResult result;

            try
            {
                string          typeName       = new TokensValidatorDAO().ValidatorAssemblyNameByTokenID(tokenInternalID);
                ITokenValidator tokenValidator = TokenValidatorFactory.LoadAssembly(typeName);
                result = tokenValidator.Synchronize(tokenInternalID, firstPwd, secondPwd);
            }
            catch (Exception innerException)
            {
                throw new Exception("SF.Expand.SAF.Core::Synchronize[]", innerException);
            }
            return(result);
        }
示例#3
0
        public OperationResult StartServerAuthentication(string tokenInternalID, string dataEntropy, out string newPwd)
        {
            OperationResult result;

            try
            {
                string          typeName       = new TokensValidatorDAO().ValidatorAssemblyNameByTokenID(tokenInternalID);
                ITokenValidator tokenValidator = TokenValidatorFactory.LoadAssembly(typeName);
                result = tokenValidator.StartServerAuthentication(tokenInternalID, dataEntropy, out newPwd);
            }
            catch (Exception innerException)
            {
                throw new Exception("SF.Expand.SAF.Core::StartServerAuthentication[]", innerException);
            }
            return(result);
        }
示例#4
0
        public AutenticationStatus Autenticate(string tokenInternalID, string password, string dataentropy, out string Challenge)
        {
            AutenticationStatus result;

            try
            {
                string          typeName       = new TokensValidatorDAO().ValidatorAssemblyNameByTokenID(tokenInternalID);
                ITokenValidator tokenValidator = TokenValidatorFactory.LoadAssembly(typeName);
                result = tokenValidator.Autenticate(tokenInternalID, password, dataentropy, out Challenge);
            }
            catch (Exception innerException)
            {
                throw new Exception("SF.Expand.SAF.Core::Autenticate[]", innerException);
            }
            return(result);
        }
示例#5
0
        public OperationResult StartServerAuthentication(string tokenInternalID, long movingFactorDrift, string dataEntropy, out string newPwd)
        {
            OperationResult result;

            try
            {
                string          assemb  = new TokensValidatorDAO().ValidatorAssemblyNameByTokenID(tokenInternalID);
                ITokenValidator _tokens = TokenValidatorFactory.LoadAssembly(assemb);
                if (_tokens == null)
                {
                    SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.ERROR, "SAFCORE", new string[]
                    {
                        "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                        "[ITokenValidator]::" + assemb.Trim(),
                        "Invalid or null typename!"
                    });
                    newPwd = null;
                    result = OperationResult.Error;
                }
                else
                {
                    result = _tokens.StartServerAuthentication(tokenInternalID, movingFactorDrift, dataEntropy, out newPwd);
                }
            }
            catch (Exception ex)
            {
                SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.EXCEPTION, "SAFCORE", new string[]
                {
                    "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                    Assembly.GetExecutingAssembly().FullName.ToString(),
                    ex.ToString()
                });
                newPwd = null;
                result = OperationResult.Error;
            }
            return(result);
        }
示例#6
0
        public AutenticationStatus Autenticate(string tokenInternalID, string password, string dataentropy, out string Challenge)
        {
            AutenticationStatus result;

            try
            {
                string          assemb  = new TokensValidatorDAO().ValidatorAssemblyNameByTokenID(tokenInternalID);
                ITokenValidator _tokens = TokenValidatorFactory.LoadAssembly(assemb);
                if (_tokens == null)
                {
                    SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.ERROR, "SAFCORE", new string[]
                    {
                        "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                        "[ITokenValidator]::" + assemb.Trim(),
                        "Invalid or null typename!"
                    });
                    Challenge = null;
                    result    = AutenticationStatus.AutenticationProcessFail;
                }
                else
                {
                    result = _tokens.Autenticate(tokenInternalID, password, dataentropy, out Challenge);
                }
            }
            catch (Exception ex)
            {
                SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.EXCEPTION, "SAFCORE", new string[]
                {
                    "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                    Assembly.GetExecutingAssembly().FullName.ToString(),
                    ex.ToString()
                });
                Challenge = null;
                result    = AutenticationStatus.AutenticationProcessFail;
            }
            return(result);
        }