我正在使用ASP.net身份,它允许我配置为在未经授权的情况下返回视图,但是现在我想返回字符串,所以我需要做什么? app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, LoginPath = new PathString("/Account/Login"), Provider = new CookieAuthenticationProvider { OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>( validateInterval: TimeSpan.FromMinutes(30), regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager)) }, ExpireTimeSpan = TimeSpan.FromMinutes(1), });
添加回答
举报
0/150
提交
取消