Esempio n. 1
0
 public AuthController(IToDoApp db, IHttpContextAccessor httpContext) : base(httpContext)
 {
     _db = db;
     // Get the role manager from the session
     _roleMgr = GetSessionData <RoleManager>(RoleMgrKey);
     // If it does not exist on the session then add it
     if (_roleMgr == null)
     {
         // Since the role manager is being created then a user still needs to be authenticated
         _roleMgr = new RoleManager(null);
         SetSessionData(RoleMgrKey, _roleMgr);
     }
 }
Esempio n. 2
0
 public RoleController(IToDoApp db)
 {
     _db = db;
 }
Esempio n. 3
0
 public UserController(IToDoApp db, IHttpContextAccessor httpContext) : base(db, httpContext)
 {
 }
Esempio n. 4
0
 public ToDoApp(IToDoApp database)
 {
     _database = database;
     _roleMgr  = new RoleManager(null);
 }