Exemplo n.º 1
0
        public bool AuthenticateAndLogin(string username, string password)
        {
            //Test
            var requiredUsername = configMgr.AppSettings("username");
            var requiredPassword = configMgr.AppSettings("password");

            var authenticated = username == requiredUsername && password == requiredPassword;

            if (authenticated)
            {
                FormsAuthentication.SetAuthCookie(username, true);
            }
            return(authenticated);
        }
 public IEnumerable <User> GetUsers()
 {
     return(new[]
     {
         new User
         {
             Name = settingsProvider().GetSettings <FunnelWebSettings>().Author,
             Username = configMgr.AppSettings("username")
         }
     });
 }