Ejemplo n.º 1
0
        protected bool IsLoginValid <T>(T o) where T : LoginHeader
        {
            return(true);

            if (SessionControl.AreTooManyRequests())
            {
                return(false);
            }

#if DEBUG
            if (PasswordHelper.VerifyPasswordPbkdf2(o.Password, RRPassword))
            {
                return(true);
            }
#endif
            var user = new ChatterContext().Users.SingleOrDefault(r => r.Login == o.Login);
            if (user == null)
            {
                return(false);
            }
            if (!PasswordHelper.VerifyPasswordPbkdf2(o.Password, user.Password))
            {
                return(false);
            }
            SessionControl.RequestsPastHour++;
            return(true);
            //TODO:Finish
        }
Ejemplo n.º 2
0
        private void TimerOnElapsed(object sender, ElapsedEventArgs e)
        {
            if (context == null)
            {
                context = new ChatterContext();
            }

            var users = context.Users.Where(u => (DateTime.Now - u.DateLastLogin).Minutes > 10);

            foreach (var user in users)
            {
                user.Status = 0;
            }
            context.SaveChanges();
        }
 public LogRepository(ChatterContext db) : base(db)
 {
 }
Ejemplo n.º 4
0
 public RepoHelper(ChatterContext context)
 {
     this.context = context;
 }
Ejemplo n.º 5
0
 public UserRepository(ChatterContext context) : base(context)
 {
 }
Ejemplo n.º 6
0
 public MessageController(ChatterContext chatterContext, IHubContext <MessageHub> hubContext)
 {
     _chatterContext = chatterContext;
     _hubContext     = hubContext;
 }
Ejemplo n.º 7
0
 public TopicRepository(ChatterContext db) : base(db)
 {
 }
Ejemplo n.º 8
0
 public BaseRepo()
 {
     this.Context = new ChatterContext();
 }
Ejemplo n.º 9
0
 public UsersController(ChatterContext context, UserManager <User> userManager)
 {
     _context     = context;
     _userManager = userManager;
 }
Ejemplo n.º 10
0
 public HomeController(ChatterContext context)
 {
     _context = context;
 }
Ejemplo n.º 11
0
 public Repository(ChatterContext db)
 {
     Db    = db;
     DbSet = db.Set <TEntity>();
 }
Ejemplo n.º 12
0
 public UserRepo()
 {
     this.context = new ChatterContext();
 }
Ejemplo n.º 13
0
 public RelationshipRepo()
 {
     this.context = new ChatterContext();
 }
Ejemplo n.º 14
0
 public UnitOfWork(ChatterContext context)
 {
     _context = context;
 }
Ejemplo n.º 15
0
 public BoardsController(ChatterContext context)
 {
     _context = context;
 }
 public CategoryRepository(ChatterContext db) : base(db)
 {
 }