Esempio n. 1
0
        public User Login(Credentials sessionCredential)
        {
            var existingUser = _userDao.GetUser(sessionCredential.UserName);

            if (existingUser == null)
            {
                throw new SecurityException("User doesn't exist!");
            }

            return existingUser;
        }
Esempio n. 2
0
 public User Login(Credentials sessionCredential)
 {
     try
     {
         return _securityService.Login(sessionCredential);
     }
     catch (Exception ex)
     {
         throw new WebFaultException<string>(ex.Message, HttpStatusCode.InternalServerError);
     }
 }