From 1ee04d29a2abcd340ab924f1d4eb2d1f8abb19c0 Mon Sep 17 00:00:00 2001 From: bicijinlian Date: Mon, 12 Jun 2023 20:51:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A7=A3=E5=86=B3=E5=85=B1=E4=BA=AB?= =?UTF-8?q?=E6=A1=86=E6=9E=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AuthStudy.Authentication.Basic.csproj | 1 + .../BasicAuthenticationDefaults.cs | 12 +++ .../BasicAuthenticationExtensions.cs | 12 +++ .../BasicAuthenticationHandler.cs | 12 +++ .../BasicAuthenticationOptions.cs | 13 +++ AuthStudy.Authentication.Basic/Class1.cs | 7 -- .../AuthStudy.Authentication.Browser.csproj | 3 +- AuthStudy.sln | 3 + Docs/说明.md | 80 +++++++++++++++++++ 9 files changed, 134 insertions(+), 9 deletions(-) create mode 100644 AuthStudy.Authentication.Basic/BasicAuthenticationDefaults.cs create mode 100644 AuthStudy.Authentication.Basic/BasicAuthenticationExtensions.cs create mode 100644 AuthStudy.Authentication.Basic/BasicAuthenticationHandler.cs create mode 100644 AuthStudy.Authentication.Basic/BasicAuthenticationOptions.cs delete mode 100644 AuthStudy.Authentication.Basic/Class1.cs create mode 100644 Docs/说明.md diff --git a/AuthStudy.Authentication.Basic/AuthStudy.Authentication.Basic.csproj b/AuthStudy.Authentication.Basic/AuthStudy.Authentication.Basic.csproj index a636233..3cc0a7d 100644 --- a/AuthStudy.Authentication.Basic/AuthStudy.Authentication.Basic.csproj +++ b/AuthStudy.Authentication.Basic/AuthStudy.Authentication.Basic.csproj @@ -7,6 +7,7 @@ + diff --git a/AuthStudy.Authentication.Basic/BasicAuthenticationDefaults.cs b/AuthStudy.Authentication.Basic/BasicAuthenticationDefaults.cs new file mode 100644 index 0000000..982b9c5 --- /dev/null +++ b/AuthStudy.Authentication.Basic/BasicAuthenticationDefaults.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AuthStudy.Authentication.Basic +{ + internal class BasicAuthenticationDefaults + { + } +} diff --git a/AuthStudy.Authentication.Basic/BasicAuthenticationExtensions.cs b/AuthStudy.Authentication.Basic/BasicAuthenticationExtensions.cs new file mode 100644 index 0000000..541a0fa --- /dev/null +++ b/AuthStudy.Authentication.Basic/BasicAuthenticationExtensions.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AuthStudy.Authentication.Basic +{ + internal class BasicAuthenticationExtensions + { + } +} diff --git a/AuthStudy.Authentication.Basic/BasicAuthenticationHandler.cs b/AuthStudy.Authentication.Basic/BasicAuthenticationHandler.cs new file mode 100644 index 0000000..ceed023 --- /dev/null +++ b/AuthStudy.Authentication.Basic/BasicAuthenticationHandler.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AuthStudy.Authentication.Basic +{ + internal class BasicAuthenticationHandler + { + } +} diff --git a/AuthStudy.Authentication.Basic/BasicAuthenticationOptions.cs b/AuthStudy.Authentication.Basic/BasicAuthenticationOptions.cs new file mode 100644 index 0000000..7a7d595 --- /dev/null +++ b/AuthStudy.Authentication.Basic/BasicAuthenticationOptions.cs @@ -0,0 +1,13 @@ + +using Microsoft.AspNetCore.Authentication; + +namespace AuthStudy.Authentication.Basic +{ + public class BasicAuthenticationOptions : AuthenticationSchemeOptions + { + public BasicAuthenticationOptions() + { + + } + } +} \ No newline at end of file diff --git a/AuthStudy.Authentication.Basic/Class1.cs b/AuthStudy.Authentication.Basic/Class1.cs deleted file mode 100644 index 4ad8e6b..0000000 --- a/AuthStudy.Authentication.Basic/Class1.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace AuthStudy.Authentication.Basic -{ - public class Class1 - { - - } -} \ No newline at end of file diff --git a/AuthStudy.Authentication.Browser/AuthStudy.Authentication.Browser.csproj b/AuthStudy.Authentication.Browser/AuthStudy.Authentication.Browser.csproj index 70018f1..18c26a9 100644 --- a/AuthStudy.Authentication.Browser/AuthStudy.Authentication.Browser.csproj +++ b/AuthStudy.Authentication.Browser/AuthStudy.Authentication.Browser.csproj @@ -7,8 +7,7 @@ - - + diff --git a/AuthStudy.sln b/AuthStudy.sln index f0e0b08..b331da4 100644 --- a/AuthStudy.sln +++ b/AuthStudy.sln @@ -20,6 +20,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "授权", "授权", "{74577ADF-0E82-4798-8D49-AA70DD82528A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{947159C1-414A-4927-A77B-7A37C8A20BDD}" + ProjectSection(SolutionItems) = preProject + Docs\说明.md = Docs\说明.md + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Docs/说明.md b/Docs/说明.md new file mode 100644 index 0000000..0039b9c --- /dev/null +++ b/Docs/说明.md @@ -0,0 +1,80 @@ +说明 +==== + +## 关于 共享框架 +随着 .NET Core 3.0 的发布,许多 ASP.NET Core 程序集不再作为包发布到 NuGet。 +相反,程序集包含在 Microsoft.AspNetCore.App 共享框架中,该框架随 .NET Core SDK 和运行时安装程序一起安装。 + ++ Web项目,一般自动包含 AspMicrosoft.AspNetCore.App 共享框架,即 共享框架由项目的Sdk属性(Microsoft.NET.Sdk.Web)自动引入 +```xml + + + + net7.0 + enable + enable + + + + + + + + + + + + + + +``` ++ 类库项目等,要手动引入(无法使用nuget包的方式引入) +```xml + + + net7.0 + enable + enable + + + + + + + + + + + + + + + + + + + +``` +```xml + + + + + netstandard2.0;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0;net7.0 + aspnetcore;authentication;security;basicauth + Debug;Release;CodeQL + + + + + + + + + + + + + + +```