示例#1
0
        public static WebApiRoleManager Create(IdentityFactoryOptions <WebApiRoleManager> options, IOwinContext context)
        {
            ///It is based on the same context as the ApplicationUserManager
            var appRoleManager = new WebApiRoleManager(new RoleStore <IdentityRole>(context.Get <AuthContext>()));

            return(appRoleManager);
        }
示例#2
0
 public AuthRepository()
 {
     Context     = new AuthContext();
     UserManager = new UserManager <WebApiUser>(new UserStore <WebApiUser>(Context));
     RoleManager = new WebApiRoleManager(new RoleStore <IdentityRole>(Context));
 }