diff --git a/FAuth/Controllers/ControllerBase.cs b/FAuth/Controllers/ControllerBase.cs index 02407a2..e03c509 100644 --- a/FAuth/Controllers/ControllerBase.cs +++ b/FAuth/Controllers/ControllerBase.cs @@ -31,10 +31,6 @@ namespace FAuth.Controllers /// 数据缓冲 /// public ICacheProvider Cache { get; set; } - /// - /// Cookie中定义的键 - /// - public CookieKeyDefine CookieKeys { get; set; } /// /// 通过日志组件和服务集合生成控制器 @@ -46,7 +42,6 @@ namespace FAuth.Controllers this.Services = service; this.Db = service.GetService(); this.Cache = service.GetService(); - this.CookieKeys = Services.GetService>().Value; } } diff --git a/FAuth/Models/CookieKeyDefine.cs b/FAuth/Models/CookieKeyDefine.cs deleted file mode 100644 index f6cd58c..0000000 --- a/FAuth/Models/CookieKeyDefine.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.Extensions.Options; - -namespace FAuth.Models -{ - /// - /// Cookie中使用的键定义 - /// - public class CookieKeyDefine:IOptions - { - public CookieKeyDefine Value => this; - - /// - /// 保存用户凭据的键 - /// - public string UserKey { get; set; } = "_userCK"; - } -} diff --git a/FAuth/Startup.cs b/FAuth/Startup.cs index 068b596..2400cd2 100644 --- a/FAuth/Startup.cs +++ b/FAuth/Startup.cs @@ -86,8 +86,6 @@ namespace FAuth services.AddUserTicketDryptor(UTDO); //עapi services.AddScoped(); - //עCookie - services.Configure(this.Configuration.GetSection("CookieKeyDefine")); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/FAuth/Views/Shared/_Layout.cshtml b/FAuth/Views/Shared/_Layout.cshtml index 95b032b..c7e55d7 100644 --- a/FAuth/Views/Shared/_Layout.cshtml +++ b/FAuth/Views/Shared/_Layout.cshtml @@ -1,6 +1,4 @@ -@using Microsoft.Extensions.Options -@inject IOptions CKD - + @@ -10,109 +8,140 @@ -
- +
- © 2020 - FAuth - 技术支持 +
+ @RenderBody() +
- + + + + + + @RenderSection("Scripts",required: false) diff --git a/FAuth/Views/User/Login.cshtml b/FAuth/Views/User/Login.cshtml index b936101..0e839dc 100644 --- a/FAuth/Views/User/Login.cshtml +++ b/FAuth/Views/User/Login.cshtml @@ -1,6 +1,4 @@ -@inject IOptions CKD - -
+
@@ -10,7 +8,7 @@