예제 #1
0
 public void SVC_TST_VerifySeedUser()
 {
     SVC_AuthenticateUser svcLogon = new SVC_AuthenticateUser();
     bool IsAuthenticated = false ;
     IsAuthenticated = svcLogon.AuthenticateLogon("dbrees");
     Console.WriteLine("User Authenticated = {0} ", IsAuthenticated.ToString());
 }
        public string ProcessLogonNameAuthenticity()
        {
            svcAuthenticateUser = new SVC_AuthenticateUser();
            foundLogon = svcAuthenticateUser.AuthenticateLogon(logon);

            if (foundLogon)
            {
                return logon;
            }
            else
            {
                return "Valid Username Entered.";
            }
        }
 public string ProcessAuthenticationRequest()
 {
     svcAuthenticateUser = new SVC_AuthenticateUser();
     foundLogon = svcAuthenticateUser.AuthenticateLogon(logon);
     foundPassword = svcAuthenticateUser.AuthenticatePassword(password);
     if (foundLogon && foundPassword)
     {
          return logon;
     }
     else
     {
         return "Invalid Password Entered";
     }
 }
        public string AuthenticateUser(string logon, string password)
        {
            SVC_AuthenticateUser svcAuthenticateUser = new SVC_AuthenticateUser();
            logonFound = svcAuthenticateUser.AuthenticateLogon(logon);
            passwordFound = svcAuthenticateUser.AuthenticatePassword(password);

            if ((logonFound && passwordFound) == true)
            {
                verifiedLogon = logon;
                return verifiedLogon;
            }
            else
            {
                return "User not verified";
            }
        }
        public string AuthenticateUser(string xmlLogon, string xmlPassword)
        {
            svcXMLHandler = new SVC_XMLHandler();
            svcAuthenticateUser = new SVC_AuthenticateUser();

            lclUsername = svcXMLHandler.DecodeXML(xmlLogon);
            lclPassword = svcXMLHandler.DecodeXML(xmlPassword);

            logonFound = svcAuthenticateUser.AuthenticateLogon(lclUsername);
            passwordFound = svcAuthenticateUser.AuthenticatePassword(lclPassword);

            if ((logonFound && passwordFound) == true)
            {
                verifiedLogon = lclUsername;
                return verifiedLogon;
            }
            else
            {
                return "User not verified";
            }
        }