public bool Authenticate(string username, string hashedPassword, out AuthenticationStatus authenticationStatus, out string email)
        {
            var ipConverge = GetIPConverge();

            IIPConvergeServer server = XmlRpcProxyGen.Create<IIPConvergeServer>();

            server.Url = ipConverge.Url + "/converge_master/converge_server.php";
            server.NonStandard = XmlRpcNonStandard.All;

            var authenticationRequest = new AuthenticateRequest();

            authenticationRequest.auth_key = ipConverge.ApiCode;
            authenticationRequest.email_address = String.Empty; // "*****@*****.**";
            authenticationRequest.md5_once_password = hashedPassword;
            authenticationRequest.product_id = ipConverge.ProductId.ToString();
            authenticationRequest.username = username;

            AuthenticateResponse response = server.Authenticate(authenticationRequest);

            authenticationStatus = response.AuthenticationStatus;
            email = response.email;

            return response.AuthenticationStatus == AuthenticationStatus.Success;
        }
예제 #2
0
        public bool Authenticate(string username, string hashedPassword, out AuthenticationStatus authenticationStatus, out string email)
        {
            var ipConverge = GetIPConverge();

            IIPConvergeServer server = XmlRpcProxyGen.Create <IIPConvergeServer>();

            server.Url         = ipConverge.Url + "/converge_master/converge_server.php";
            server.NonStandard = XmlRpcNonStandard.All;

            var authenticationRequest = new AuthenticateRequest();

            authenticationRequest.auth_key          = ipConverge.ApiCode;
            authenticationRequest.email_address     = String.Empty;         // "*****@*****.**";
            authenticationRequest.md5_once_password = hashedPassword;
            authenticationRequest.product_id        = ipConverge.ProductId.ToString();
            authenticationRequest.username          = username;

            AuthenticateResponse response = server.Authenticate(authenticationRequest);

            authenticationStatus = response.AuthenticationStatus;
            email = response.email;

            return(response.AuthenticationStatus == AuthenticationStatus.Success);
        }