Exemplo 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);
     }
 }
Exemplo n.º 2
0
 public RoleController(IToDoApp db)
 {
     _db = db;
 }
Exemplo n.º 3
0
 public UserController(IToDoApp db, IHttpContextAccessor httpContext) : base(db, httpContext)
 {
 }
Exemplo n.º 4
0
 public ToDoApp(IToDoApp database)
 {
     _database = database;
     _roleMgr  = new RoleManager(null);
 }