Exemplo n.º 1
0
        public Session AuthenticateUser(Providers.IDatabase db, User user, string passwordToTest)
        {
            CheckInitialization();

            if (!_dbSessionManagers.ContainsKey(db))
            {
                throw new ArgumentException("Unable to locate sessions for the argument database.");
            }

            DatabaseSessionManager dsm = _dbSessionManagers[db];

            Logger.Storage.Debug("Attempting to authenticate the user '" + user.Username + "'...");
            Logger.Security.Debug("Authenticating user '" + user.Username + "'...");
            return(dsm.AuthenticateUser(user, passwordToTest));
        }
Exemplo n.º 2
0
 public Database(IServer server, string dbName, DatabaseSessionManager sessionManager)
     : this(server, dbName)
 {
     SessionManager = sessionManager;
 }