Ejemplo n.º 1
0
        public async Task LoginAsync(string username, string password)
        {
            _authService = new AuthenticateSoapClient(AuthenticateSoapClient.EndpointConfiguration.AuthenticateSoap);

            var credential = new Credential
            {
                Username      = username,
                Password      = GetMd5Hash(password),
                ApplicationId = _applicationId
            };

            SessionId = await _authService.LoginAsync(credential);

            if (string.IsNullOrEmpty(SessionId))
            {
                throw new ArgumentException("LoginAsync operation failed");
            }

            ConfigureService();
        }