Пример #1
0
        public Response SignInLogic(UserLogin login)
        {
            Response result;

            try {
                _usersExtensionsServices.SignIn(login);
                var registeredServicesData = _utilsServices.GetUserIdentityProviders(_identityProviders);
                var json = registeredServicesData.ToString();
                result = _utilsServices.GetResponse(ResponseType.Success, "", json);
            } catch (Exception ex) {
                result = _utilsServices.GetResponse(ResponseType.InvalidUser, ex.Message);
            }
            return(result);
        }
Пример #2
0
        protected ContentResult SignInLogic(UserLogin login)
        {
            Response result;

            try {
                _usersExtensionsServices.SignIn(login);
                List <string> roles = new List <string>();
                var           registeredServicesData = _utilsServices.GetUserIdentityProviders(_identityProviders);
                var           json = registeredServicesData.ToString();
                result = _utilsServices.GetResponse(ResponseType.Success, "", json);
            } catch (Exception ex) {
                result = _utilsServices.GetResponse(ResponseType.InvalidUser, ex.Message);
            }
            return(_utilsServices.ConvertToJsonResult(result));
        }