Просмотр исходного кода

Factor out auth and forms. Fixes #12950 (#12999)

* Add empty Authorization src and test projects

* Add references

* Move auth types into .Authorization project

* Move auth tests

* Fix Mvc.ViewFeatures

* Remove the reference from .Web to .Authorization, so it's truly optional

* Add empty Forms src and test projects

* Remove dependencies from Components.csproj

* Move forms sources and tests

* Reference .Forms from .Web (needed unless we also have .Forms.Web)

* Rebase on #12936

* Update reference assemblies

* CR: Add Authorization namespace

* Update ref sources

* Add missing using

* Add another missing using
Steve Sanderson 6 лет назад
Родитель
Сommit
a4ab9ffa05
75 измененных файлов с 523 добавлено и 305 удалено
  1. 2 0
      eng/ProjectReferences.props
  2. 2 0
      eng/SharedFramework.Local.props
  3. 16 0
      src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj
  4. 68 0
      src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp3.0.cs
  5. 68 0
      src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs
  6. 1 2
      src/Components/Authorization/src/AttributeAuthorizeDataCache.cs
  7. 1 1
      src/Components/Authorization/src/AuthenticationState.cs
  8. 1 1
      src/Components/Authorization/src/AuthenticationStateProvider.cs
  9. 1 1
      src/Components/Authorization/src/AuthorizeDataAdapter.cs
  10. 1 2
      src/Components/Authorization/src/AuthorizeRouteView.cs
  11. 1 1
      src/Components/Authorization/src/AuthorizeView.cs
  12. 1 1
      src/Components/Authorization/src/AuthorizeViewCore.cs
  13. 0 1
      src/Components/Authorization/src/CascadingAuthenticationState.razor
  14. 1 1
      src/Components/Authorization/src/IHostEnvironmentAuthenticationStateProvider.cs
  15. 18 0
      src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj
  16. 1 1
      src/Components/Authorization/test/AuthorizeRouteViewTest.cs
  17. 1 1
      src/Components/Authorization/test/AuthorizeViewTest.cs
  18. 1 1
      src/Components/Authorization/test/CascadingAuthenticationStateTest.cs
  19. 18 0
      src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj
  20. 2 2
      src/Components/Authorization/test/TestAuthenticationStateProvider.cs
  21. 1 1
      src/Components/Authorization/test/TestAuthorizationPolicyProvider.cs
  22. 1 1
      src/Components/Authorization/test/TestAuthorizationService.cs
  23. 1 1
      src/Components/Authorization/test/TestIdentity.cs
  24. 1 0
      src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj
  25. 2 0
      src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs
  26. 2 1
      src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj
  27. 64 0
      src/Components/Components.sln
  28. 4 3
      src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj
  29. 0 134
      src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs
  30. 0 134
      src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
  31. 3 7
      src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
  32. 4 2
      src/Components/Components/src/Properties/AssemblyInfo.cs
  33. 4 0
      src/Components/ComponentsNoDeps.slnf
  34. 15 0
      src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj
  35. 75 0
      src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp3.0.cs
  36. 75 0
      src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs
  37. 0 0
      src/Components/Forms/src/DataAnnotationsValidator.cs
  38. 0 0
      src/Components/Forms/src/EditContext.cs
  39. 0 0
      src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs
  40. 0 0
      src/Components/Forms/src/FieldChangedEventArgs.cs
  41. 0 0
      src/Components/Forms/src/FieldIdentifier.cs
  42. 0 0
      src/Components/Forms/src/FieldState.cs
  43. 20 0
      src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj
  44. 0 0
      src/Components/Forms/src/ValidationMessageStore.cs
  45. 0 0
      src/Components/Forms/src/ValidationRequestedEventArgs.cs
  46. 0 0
      src/Components/Forms/src/ValidationStateChangedEventArgs.cs
  47. 0 0
      src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs
  48. 0 0
      src/Components/Forms/test/EditContextTest.cs
  49. 0 0
      src/Components/Forms/test/FieldIdentifierTest.cs
  50. 17 0
      src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj
  51. 0 0
      src/Components/Forms/test/ValidationMessageStoreTest.cs
  52. 1 0
      src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj
  53. 4 4
      src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs
  54. 1 0
      src/Components/Server/src/Circuits/CircuitHost.cs
  55. 1 0
      src/Components/Server/src/Circuits/RevalidatingServerAuthenticationStateProvider.cs
  56. 1 0
      src/Components/Server/src/Circuits/ServerAuthenticationStateProvider.cs
  57. 1 0
      src/Components/Server/src/DependencyInjection/ComponentServiceCollectionExtensions.cs
  58. 2 1
      src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj
  59. 1 0
      src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProvider.cs
  60. 1 0
      src/Components/Server/test/Circuits/ServerAuthenticationStateProviderTest.cs
  61. 2 0
      src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj
  62. 1 0
      src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj
  63. 1 0
      src/Components/test/testassets/BasicTestApp/AuthTest/AuthRouter.razor
  64. 1 0
      src/Components/test/testassets/BasicTestApp/AuthTest/AuthorizeViewCases.razor
  65. 1 0
      src/Components/test/testassets/BasicTestApp/AuthTest/CascadingAuthenticationStateConsumer.razor
  66. 1 0
      src/Components/test/testassets/BasicTestApp/AuthTest/ServerAuthenticationStateProvider.cs
  67. 1 0
      src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj
  68. 1 0
      src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor
  69. 1 0
      src/Components/test/testassets/BasicTestApp/Startup.cs
  70. 1 0
      src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj
  71. 1 0
      src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj
  72. 1 0
      src/Mvc/Mvc.ViewFeatures/src/RazorComponents/StaticComponentRenderer.cs
  73. 1 0
      src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Areas/Identity/RevalidatingIdentityAuthenticationStateProvider.cs
  74. 1 0
      src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Startup.cs
  75. 1 0
      src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/_Imports.razor

+ 2 - 0
eng/ProjectReferences.props

@@ -131,10 +131,12 @@
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.SignalR.Core" ProjectPath="$(RepoRoot)src\SignalR\server\Core\src\Microsoft.AspNetCore.SignalR.Core.csproj" RefProjectPath="$(RepoRoot)src\SignalR\server\Core\ref\Microsoft.AspNetCore.SignalR.Core.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.SignalR" ProjectPath="$(RepoRoot)src\SignalR\server\SignalR\src\Microsoft.AspNetCore.SignalR.csproj" RefProjectPath="$(RepoRoot)src\SignalR\server\SignalR\ref\Microsoft.AspNetCore.SignalR.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" ProjectPath="$(RepoRoot)src\SignalR\server\StackExchangeRedis\src\Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj" RefProjectPath="$(RepoRoot)src\SignalR\server\StackExchangeRedis\ref\Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj" />
+    <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Authorization" ProjectPath="$(RepoRoot)src\Components\Authorization\src\Microsoft.AspNetCore.Components.Authorization.csproj" RefProjectPath="$(RepoRoot)src\Components\Authorization\ref\Microsoft.AspNetCore.Components.Authorization.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor" ProjectPath="$(RepoRoot)src\Components\Blazor\Blazor\src\Microsoft.AspNetCore.Blazor.csproj" RefProjectPath="$(RepoRoot)src\Components\Blazor\Blazor\ref\Microsoft.AspNetCore.Blazor.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.HttpClient" ProjectPath="$(RepoRoot)src\Components\Blazor\Http\src\Microsoft.AspNetCore.Blazor.HttpClient.csproj" RefProjectPath="$(RepoRoot)src\Components\Blazor\Http\ref\Microsoft.AspNetCore.Blazor.HttpClient.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Server" ProjectPath="$(RepoRoot)src\Components\Blazor\Server\src\Microsoft.AspNetCore.Blazor.Server.csproj" RefProjectPath="$(RepoRoot)src\Components\Blazor\Server\ref\Microsoft.AspNetCore.Blazor.Server.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components" ProjectPath="$(RepoRoot)src\Components\Components\src\Microsoft.AspNetCore.Components.csproj" RefProjectPath="$(RepoRoot)src\Components\Components\ref\Microsoft.AspNetCore.Components.csproj" />
+    <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Forms" ProjectPath="$(RepoRoot)src\Components\Forms\src\Microsoft.AspNetCore.Components.Forms.csproj" RefProjectPath="$(RepoRoot)src\Components\Forms\ref\Microsoft.AspNetCore.Components.Forms.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Server" ProjectPath="$(RepoRoot)src\Components\Server\src\Microsoft.AspNetCore.Components.Server.csproj" RefProjectPath="$(RepoRoot)src\Components\Server\ref\Microsoft.AspNetCore.Components.Server.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Web" ProjectPath="$(RepoRoot)src\Components\Web\src\Microsoft.AspNetCore.Components.Web.csproj" RefProjectPath="$(RepoRoot)src\Components\Web\ref\Microsoft.AspNetCore.Components.Web.csproj" />
   </ItemGroup>

+ 2 - 0
eng/SharedFramework.Local.props

@@ -22,7 +22,9 @@
     <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Http.Connections.Common" />
     <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.SignalR.Protocols.Json" />
     <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.SignalR.Common" />
+    <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Authorization" />
     <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components" />
+    <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Forms" />
     <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Web" />
 
     <!-- These assemblies are only in the shared framework -->

+ 16 - 0
src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj

@@ -0,0 +1,16 @@
+<!-- This file is automatically generated. -->
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
+  </PropertyGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
+    <Compile Include="Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs" />
+    <Reference Include="Microsoft.AspNetCore.Authorization"  />
+    <Reference Include="Microsoft.AspNetCore.Components"  />
+  </ItemGroup>
+<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
+    <Compile Include="Microsoft.AspNetCore.Components.Authorization.netcoreapp3.0.cs" />
+    <Reference Include="Microsoft.AspNetCore.Authorization"  />
+    <Reference Include="Microsoft.AspNetCore.Components"  />
+  </ItemGroup>
+</Project>

+ 68 - 0
src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp3.0.cs

@@ -0,0 +1,68 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.AspNetCore.Components.Authorization
+{
+    public partial class AuthenticationState
+    {
+        public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { }
+        public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+    }
+    public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> task);
+    public abstract partial class AuthenticationStateProvider
+    {
+        protected AuthenticationStateProvider() { }
+        public event Microsoft.AspNetCore.Components.Authorization.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } }
+        public abstract System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> GetAuthenticationStateAsync();
+        protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> task) { }
+    }
+    public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView
+    {
+        public AuthorizeRouteView() { }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
+    }
+    public partial class AuthorizeView : Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore
+    {
+        public AuthorizeView() { }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; }
+    }
+    public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase
+    {
+        protected AuthorizeViewCore() { }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
+        protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData();
+        [System.Diagnostics.DebuggerStepThroughAttribute]
+        protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; }
+    }
+    public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
+    {
+        public CascadingAuthenticationState() { }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
+        protected override void OnInitialized() { }
+        void System.IDisposable.Dispose() { }
+    }
+    public partial interface IHostEnvironmentAuthenticationStateProvider
+    {
+        void SetAuthenticationState(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> authenticationStateTask);
+    }
+}

+ 68 - 0
src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs

@@ -0,0 +1,68 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.AspNetCore.Components.Authorization
+{
+    public partial class AuthenticationState
+    {
+        public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { }
+        public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+    }
+    public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> task);
+    public abstract partial class AuthenticationStateProvider
+    {
+        protected AuthenticationStateProvider() { }
+        public event Microsoft.AspNetCore.Components.Authorization.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } }
+        public abstract System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> GetAuthenticationStateAsync();
+        protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> task) { }
+    }
+    public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView
+    {
+        public AuthorizeRouteView() { }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
+    }
+    public partial class AuthorizeView : Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore
+    {
+        public AuthorizeView() { }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; }
+    }
+    public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase
+    {
+        protected AuthorizeViewCore() { }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
+        protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData();
+        [System.Diagnostics.DebuggerStepThroughAttribute]
+        protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; }
+    }
+    public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
+    {
+        public CascadingAuthenticationState() { }
+        [Microsoft.AspNetCore.Components.ParameterAttribute]
+        public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
+        protected override void OnInitialized() { }
+        void System.IDisposable.Dispose() { }
+    }
+    public partial interface IHostEnvironmentAuthenticationStateProvider
+    {
+        void SetAuthenticationState(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> authenticationStateTask);
+    }
+}

+ 1 - 2
src/Components/Components/src/Auth/AttributeAuthorizeDataCache.cs → src/Components/Authorization/src/AttributeAuthorizeDataCache.cs

@@ -4,10 +4,9 @@
 using System;
 using System.Collections.Concurrent;
 using System.Linq;
-using System.Reflection;
 using Microsoft.AspNetCore.Authorization;
 
-namespace Microsoft.AspNetCore.Components.Auth
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     internal static class AttributeAuthorizeDataCache
     {

+ 1 - 1
src/Components/Components/src/Auth/AuthenticationState.cs → src/Components/Authorization/src/AuthenticationState.cs

@@ -4,7 +4,7 @@
 using System;
 using System.Security.Claims;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     /// <summary>
     /// Provides information about the currently authenticated user, if any.

+ 1 - 1
src/Components/Components/src/Auth/AuthenticationStateProvider.cs → src/Components/Authorization/src/AuthenticationStateProvider.cs

@@ -4,7 +4,7 @@
 using System;
 using System.Threading.Tasks;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     /// <summary>
     /// Provides information about the authentication state of the current user.

+ 1 - 1
src/Components/Components/src/Auth/AuthorizeDataAdapter.cs → src/Components/Authorization/src/AuthorizeDataAdapter.cs

@@ -4,7 +4,7 @@
 using System;
 using Microsoft.AspNetCore.Authorization;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     // This is so the AuthorizeView can avoid implementing IAuthorizeData (even privately)
     internal class AuthorizeDataAdapter : IAuthorizeData

+ 1 - 2
src/Components/Components/src/Auth/AuthorizeRouteView.cs → src/Components/Authorization/src/AuthorizeRouteView.cs

@@ -3,10 +3,9 @@
 
 using System.Threading.Tasks;
 using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Components.Auth;
 using Microsoft.AspNetCore.Components.Rendering;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     /// <summary>
     /// Combines the behaviors of <see cref="AuthorizeView"/> and <see cref="RouteView"/>,

+ 1 - 1
src/Components/Components/src/Auth/AuthorizeView.cs → src/Components/Authorization/src/AuthorizeView.cs

@@ -3,7 +3,7 @@
 
 using Microsoft.AspNetCore.Authorization;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     /// <summary>
     /// Displays differing content depending on the user's authorization status.

+ 1 - 1
src/Components/Components/src/Auth/AuthorizeViewCore.cs → src/Components/Authorization/src/AuthorizeViewCore.cs

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Components.Rendering;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     /// <summary>
     /// A base class for components that display differing content depending on the user's authorization status.

+ 0 - 1
src/Components/Components/src/Auth/CascadingAuthenticationState.razor → src/Components/Authorization/src/CascadingAuthenticationState.razor

@@ -1,4 +1,3 @@
-@namespace Microsoft.AspNetCore.Components
 @implements IDisposable
 @inject AuthenticationStateProvider AuthenticationStateProvider
 

+ 1 - 1
src/Components/Components/src/Auth/IHostEnvironmentAuthenticationStateProvider.cs → src/Components/Authorization/src/IHostEnvironmentAuthenticationStateProvider.cs

@@ -3,7 +3,7 @@
 
 using System.Threading.Tasks;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     /// <summary>
     /// An interface implemented by <see cref="AuthenticationStateProvider"/> classes that can receive authentication

+ 18 - 0
src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj

@@ -0,0 +1,18 @@
+<Project Sdk="Microsoft.NET.Sdk.Razor">
+
+  <PropertyGroup>
+    <TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netcoreapp3.0</TargetFrameworks>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
+    <Description>Authentication and authorization support for Blazor applications.</Description>
+    <GenerateDocumentationFile>true</GenerateDocumentationFile>
+    <IsShippingPackage>true</IsShippingPackage>
+    <RazorLangVersion>3.0</RazorLangVersion>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <Reference Include="Microsoft.AspNetCore.Authorization" />
+    <Reference Include="Microsoft.AspNetCore.Components" />
+  </ItemGroup>
+
+</Project>

+ 1 - 1
src/Components/Components/test/Auth/AuthorizeRouteViewTest.cs → src/Components/Authorization/test/AuthorizeRouteViewTest.cs

@@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Components.Test.Helpers;
 using Microsoft.Extensions.DependencyInjection;
 using Xunit;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     public class AuthorizeRouteViewTest
     {

+ 1 - 1
src/Components/Components/test/Auth/AuthorizeViewTest.cs → src/Components/Authorization/test/AuthorizeViewTest.cs

@@ -16,7 +16,7 @@ using Microsoft.AspNetCore.Components.Test.Helpers;
 using Microsoft.Extensions.DependencyInjection;
 using Xunit;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     public class AuthorizeViewTest
     {

+ 1 - 1
src/Components/Components/test/Auth/CascadingAuthenticationStateTest.cs → src/Components/Authorization/test/CascadingAuthenticationStateTest.cs

@@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Components.Test.Helpers;
 using Microsoft.Extensions.DependencyInjection;
 using Xunit;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     public class CascadingAuthenticationStateTest
     {

+ 18 - 0
src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj

@@ -0,0 +1,18 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netcoreapp3.0</TargetFramework>
+    <RootNamespace>Microsoft.AspNetCore.Components.Authorization</RootNamespace>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <Reference Include="Microsoft.AspNetCore.Components.Authorization" />
+    <Reference Include="Microsoft.Extensions.DependencyInjection" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <Compile Include="$(ComponentsSharedSourceRoot)test\**\*.cs" LinkBase="Helpers" />
+    <Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
+  </ItemGroup>
+
+</Project>

+ 2 - 2
src/Components/Components/test/Auth/TestAuthenticationStateProvider.cs → src/Components/Authorization/test/TestAuthenticationStateProvider.cs

@@ -1,9 +1,9 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
 using System.Threading.Tasks;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     public class TestAuthenticationStateProvider : AuthenticationStateProvider
     {

+ 1 - 1
src/Components/Components/test/Auth/TestAuthorizationPolicyProvider.cs → src/Components/Authorization/test/TestAuthorizationPolicyProvider.cs

@@ -4,7 +4,7 @@
 using System.Threading.Tasks;
 using Microsoft.AspNetCore.Authorization;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     public class TestAuthorizationPolicyProvider : IAuthorizationPolicyProvider
     {

+ 1 - 1
src/Components/Components/test/Auth/TestAuthorizationService.cs → src/Components/Authorization/test/TestAuthorizationService.cs

@@ -7,7 +7,7 @@ using System.Security.Claims;
 using System.Threading.Tasks;
 using Microsoft.AspNetCore.Authorization;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     public class TestAuthorizationService : IAuthorizationService
     {

+ 1 - 1
src/Components/Components/test/Auth/TestIdentity.cs → src/Components/Authorization/test/TestIdentity.cs

@@ -3,7 +3,7 @@
 
 using System.Security.Principal;
 
-namespace Microsoft.AspNetCore.Components
+namespace Microsoft.AspNetCore.Components.Authorization
 {
     public class TestIdentity : IIdentity
     {

+ 1 - 0
src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj

@@ -7,5 +7,6 @@
     <Compile Include="Microsoft.AspNetCore.Blazor.netstandard2.0.cs" />
     <Reference Include="Mono.WebAssembly.Interop"  />
     <Reference Include="Microsoft.AspNetCore.Components.Web"  />
+    <Reference Include="Microsoft.Extensions.Options"  />
   </ItemGroup>
 </Project>

+ 2 - 0
src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs

@@ -106,6 +106,8 @@ namespace Microsoft.AspNetCore.Blazor.Hosting
             });
 
             // Needed for authorization
+            // However, since authorization isn't on by default, we could consider removing these and
+            // having a separate services.AddBlazorAuthorization() call that brings in the required services.
             services.AddOptions();
             services.TryAdd(ServiceDescriptor.Singleton(typeof(ILogger<>), typeof(WebAssemblyConsoleLogger<>)));
 

+ 2 - 1
src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj

@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
@@ -9,6 +9,7 @@
   <ItemGroup>
     <Reference Include="Mono.WebAssembly.Interop" />
     <Reference Include="Microsoft.AspNetCore.Components.Web" />
+    <Reference Include="Microsoft.Extensions.Options" />
   </ItemGroup>
 
   <ItemGroup>

+ 64 - 0
src/Components/Components.sln

@@ -226,6 +226,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Web.Tests", "Web\test\Microsoft.AspNetCore.Components.Web.Tests.csproj", "{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}"
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Authorization", "Authorization", "{08791FEE-761D-40EF-B701-1D31FD1E6E53}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Authorization", "Authorization\src\Microsoft.AspNetCore.Components.Authorization.csproj", "{956F540A-3CDA-4913-9373-1A4E8A93BDD8}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Authorization.Tests", "Authorization\test\Microsoft.AspNetCore.Components.Authorization.Tests.csproj", "{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Forms", "Forms", "{B0EEB429-4C8C-42AA-8822-3058E7DBC98F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Forms", "Forms\src\Microsoft.AspNetCore.Components.Forms.csproj", "{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Forms.Tests", "Forms\test\Microsoft.AspNetCore.Components.Forms.Tests.csproj", "{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -1436,6 +1448,54 @@ Global
 		{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|x64.Build.0 = Release|Any CPU
 		{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|x86.ActiveCfg = Release|Any CPU
 		{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Release|x86.Build.0 = Release|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|x64.Build.0 = Debug|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Debug|x86.Build.0 = Debug|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|Any CPU.Build.0 = Release|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|x64.ActiveCfg = Release|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|x64.Build.0 = Release|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|x86.ActiveCfg = Release|Any CPU
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8}.Release|x86.Build.0 = Release|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|x64.Build.0 = Debug|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Debug|x86.Build.0 = Debug|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|x64.ActiveCfg = Release|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|x64.Build.0 = Release|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|x86.ActiveCfg = Release|Any CPU
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88}.Release|x86.Build.0 = Release|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|x64.Build.0 = Debug|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Debug|x86.Build.0 = Debug|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|x64.ActiveCfg = Release|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|x64.Build.0 = Release|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|x86.ActiveCfg = Release|Any CPU
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED}.Release|x86.Build.0 = Release|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|x64.Build.0 = Debug|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Debug|x86.Build.0 = Debug|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|Any CPU.Build.0 = Release|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|x64.ActiveCfg = Release|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|x64.Build.0 = Release|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|x86.ActiveCfg = Release|Any CPU
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -1543,6 +1603,10 @@ Global
 		{74D21785-2FAB-4266-B7C4-E311EC8EE0DF} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
 		{E4C01A3F-D3C1-4639-A6A9-930E918843DD} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
 		{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684} = {A27FF193-195B-4474-8E6C-840B2E339373}
+		{956F540A-3CDA-4913-9373-1A4E8A93BDD8} = {08791FEE-761D-40EF-B701-1D31FD1E6E53}
+		{B13CDE69-ED22-4664-AAD7-686ED8CD5E88} = {08791FEE-761D-40EF-B701-1D31FD1E6E53}
+		{A5C132FB-1E03-4DA9-8D05-80755ED1D0ED} = {B0EEB429-4C8C-42AA-8822-3058E7DBC98F}
+		{173D84A3-0F37-480F-AC0F-7E2DBBE32B28} = {B0EEB429-4C8C-42AA-8822-3058E7DBC98F}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {CC3C47E1-AD1A-4619-9CD3-E08A0148E5CE}

+ 4 - 3
src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj

@@ -5,13 +5,14 @@
   </PropertyGroup>
   <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
     <Compile Include="Microsoft.AspNetCore.Components.netstandard2.0.cs" />
-    <Reference Include="Microsoft.AspNetCore.Authorization"  />
     <Reference Include="Microsoft.JSInterop"  />
-    <Reference Include="System.ComponentModel.Annotations"  />
+    <Reference Include="Microsoft.Extensions.Logging.Abstractions"  />
+    <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions"  />
   </ItemGroup>
 <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
     <Compile Include="Microsoft.AspNetCore.Components.netcoreapp3.0.cs" />
-    <Reference Include="Microsoft.AspNetCore.Authorization"  />
     <Reference Include="Microsoft.JSInterop"  />
+    <Reference Include="Microsoft.Extensions.Logging.Abstractions"  />
+    <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions"  />
   </ItemGroup>
 </Project>

+ 0 - 134
src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs

@@ -3,55 +3,6 @@
 
 namespace Microsoft.AspNetCore.Components
 {
-    public partial class AuthenticationState
-    {
-        public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { }
-        public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
-    }
-    public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> task);
-    public abstract partial class AuthenticationStateProvider
-    {
-        protected AuthenticationStateProvider() { }
-        public event Microsoft.AspNetCore.Components.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } }
-        public abstract System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> GetAuthenticationStateAsync();
-        protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> task) { }
-    }
-    public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView
-    {
-        public AuthorizeRouteView() { }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
-    }
-    public partial class AuthorizeView : Microsoft.AspNetCore.Components.AuthorizeViewCore
-    {
-        public AuthorizeView() { }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; }
-    }
-    public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase
-    {
-        protected AuthorizeViewCore() { }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
-        protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData();
-        [System.Diagnostics.DebuggerStepThroughAttribute]
-        protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; }
-    }
     public static partial class BindConverter
     {
         public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -99,15 +50,6 @@ namespace Microsoft.AspNetCore.Components
         public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) { throw null; }
         public static bool TryConvertTo<T>(object obj, System.Globalization.CultureInfo culture, out T value) { throw null; }
     }
-    public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
-    {
-        public CascadingAuthenticationState() { }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
-        protected override void OnInitialized() { }
-        void System.IDisposable.Dispose() { }
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
     public sealed partial class CascadingParameterAttribute : System.Attribute
     {
@@ -266,10 +208,6 @@ namespace Microsoft.AspNetCore.Components
     {
         System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object arg);
     }
-    public partial interface IHostEnvironmentAuthenticationStateProvider
-    {
-        void SetAuthenticationState(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> authenticationStateTask);
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
     public sealed partial class InjectAttribute : System.Attribute
     {
@@ -423,78 +361,6 @@ namespace Microsoft.AspNetCore.Components.CompilerServices
         public static T TypeCheck<T>(T value) { throw null; }
     }
 }
-namespace Microsoft.AspNetCore.Components.Forms
-{
-    public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase
-    {
-        public DataAnnotationsValidator() { }
-        protected override void OnInitialized() { }
-    }
-    public sealed partial class EditContext
-    {
-        public EditContext(object model) { }
-        public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
-        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.FieldChangedEventArgs> OnFieldChanged { add { } remove { } }
-        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs> OnValidationRequested { add { } remove { } }
-        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs> OnValidationStateChanged { add { } remove { } }
-        public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; }
-        public System.Collections.Generic.IEnumerable<string> GetValidationMessages() { throw null; }
-        public System.Collections.Generic.IEnumerable<string> GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; }
-        public System.Collections.Generic.IEnumerable<string> GetValidationMessages(System.Linq.Expressions.Expression<System.Func<object>> accessor) { throw null; }
-        public bool IsModified() { throw null; }
-        public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; }
-        public bool IsModified(System.Linq.Expressions.Expression<System.Func<object>> accessor) { throw null; }
-        public void MarkAsUnmodified() { }
-        public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
-        public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
-        public void NotifyValidationStateChanged() { }
-        public bool Validate() { throw null; }
-    }
-    public static partial class EditContextDataAnnotationsExtensions
-    {
-        public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; }
-    }
-    public sealed partial class FieldChangedEventArgs : System.EventArgs
-    {
-        public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
-        public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
-    }
-    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
-    public readonly partial struct FieldIdentifier : System.IEquatable<Microsoft.AspNetCore.Components.Forms.FieldIdentifier>
-    {
-        private readonly object _dummy;
-        public FieldIdentifier(object model, string fieldName) { throw null; }
-        public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
-        public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
-        public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create<TField>(System.Linq.Expressions.Expression<System.Func<TField>> accessor) { throw null; }
-        public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; }
-        public override bool Equals(object obj) { throw null; }
-        public override int GetHashCode() { throw null; }
-    }
-    public sealed partial class ValidationMessageStore
-    {
-        public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { }
-        public System.Collections.Generic.IEnumerable<string> this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } }
-        public System.Collections.Generic.IEnumerable<string> this[System.Linq.Expressions.Expression<System.Func<object>> accessor] { get { throw null; } }
-        public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable<string> messages) { }
-        public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { }
-        public void Add(System.Linq.Expressions.Expression<System.Func<object>> accessor, System.Collections.Generic.IEnumerable<string> messages) { }
-        public void Add(System.Linq.Expressions.Expression<System.Func<object>> accessor, string message) { }
-        public void Clear() { }
-        public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
-        public void Clear(System.Linq.Expressions.Expression<System.Func<object>> accessor) { }
-    }
-    public sealed partial class ValidationRequestedEventArgs : System.EventArgs
-    {
-        public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty;
-        public ValidationRequestedEventArgs() { }
-    }
-    public sealed partial class ValidationStateChangedEventArgs : System.EventArgs
-    {
-        public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty;
-        public ValidationStateChangedEventArgs() { }
-    }
-}
 namespace Microsoft.AspNetCore.Components.Rendering
 {
     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]

+ 0 - 134
src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs

@@ -3,55 +3,6 @@
 
 namespace Microsoft.AspNetCore.Components
 {
-    public partial class AuthenticationState
-    {
-        public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { }
-        public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
-    }
-    public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> task);
-    public abstract partial class AuthenticationStateProvider
-    {
-        protected AuthenticationStateProvider() { }
-        public event Microsoft.AspNetCore.Components.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } }
-        public abstract System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> GetAuthenticationStateAsync();
-        protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> task) { }
-    }
-    public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView
-    {
-        public AuthorizeRouteView() { }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
-    }
-    public partial class AuthorizeView : Microsoft.AspNetCore.Components.AuthorizeViewCore
-    {
-        public AuthorizeView() { }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; }
-    }
-    public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase
-    {
-        protected AuthorizeViewCore() { }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
-        protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData();
-        [System.Diagnostics.DebuggerStepThroughAttribute]
-        protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; }
-    }
     public static partial class BindConverter
     {
         public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -99,15 +50,6 @@ namespace Microsoft.AspNetCore.Components
         public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) { throw null; }
         public static bool TryConvertTo<T>(object obj, System.Globalization.CultureInfo culture, out T value) { throw null; }
     }
-    public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
-    {
-        public CascadingAuthenticationState() { }
-        [Microsoft.AspNetCore.Components.ParameterAttribute]
-        public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
-        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
-        protected override void OnInitialized() { }
-        void System.IDisposable.Dispose() { }
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
     public sealed partial class CascadingParameterAttribute : System.Attribute
     {
@@ -266,10 +208,6 @@ namespace Microsoft.AspNetCore.Components
     {
         System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object arg);
     }
-    public partial interface IHostEnvironmentAuthenticationStateProvider
-    {
-        void SetAuthenticationState(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> authenticationStateTask);
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
     public sealed partial class InjectAttribute : System.Attribute
     {
@@ -423,78 +361,6 @@ namespace Microsoft.AspNetCore.Components.CompilerServices
         public static T TypeCheck<T>(T value) { throw null; }
     }
 }
-namespace Microsoft.AspNetCore.Components.Forms
-{
-    public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase
-    {
-        public DataAnnotationsValidator() { }
-        protected override void OnInitialized() { }
-    }
-    public sealed partial class EditContext
-    {
-        public EditContext(object model) { }
-        public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
-        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.FieldChangedEventArgs> OnFieldChanged { add { } remove { } }
-        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs> OnValidationRequested { add { } remove { } }
-        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs> OnValidationStateChanged { add { } remove { } }
-        public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; }
-        public System.Collections.Generic.IEnumerable<string> GetValidationMessages() { throw null; }
-        public System.Collections.Generic.IEnumerable<string> GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; }
-        public System.Collections.Generic.IEnumerable<string> GetValidationMessages(System.Linq.Expressions.Expression<System.Func<object>> accessor) { throw null; }
-        public bool IsModified() { throw null; }
-        public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; }
-        public bool IsModified(System.Linq.Expressions.Expression<System.Func<object>> accessor) { throw null; }
-        public void MarkAsUnmodified() { }
-        public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
-        public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
-        public void NotifyValidationStateChanged() { }
-        public bool Validate() { throw null; }
-    }
-    public static partial class EditContextDataAnnotationsExtensions
-    {
-        public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; }
-    }
-    public sealed partial class FieldChangedEventArgs : System.EventArgs
-    {
-        public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
-        public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
-    }
-    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
-    public readonly partial struct FieldIdentifier : System.IEquatable<Microsoft.AspNetCore.Components.Forms.FieldIdentifier>
-    {
-        private readonly object _dummy;
-        public FieldIdentifier(object model, string fieldName) { throw null; }
-        public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
-        public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
-        public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create<TField>(System.Linq.Expressions.Expression<System.Func<TField>> accessor) { throw null; }
-        public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; }
-        public override bool Equals(object obj) { throw null; }
-        public override int GetHashCode() { throw null; }
-    }
-    public sealed partial class ValidationMessageStore
-    {
-        public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { }
-        public System.Collections.Generic.IEnumerable<string> this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } }
-        public System.Collections.Generic.IEnumerable<string> this[System.Linq.Expressions.Expression<System.Func<object>> accessor] { get { throw null; } }
-        public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable<string> messages) { }
-        public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { }
-        public void Add(System.Linq.Expressions.Expression<System.Func<object>> accessor, System.Collections.Generic.IEnumerable<string> messages) { }
-        public void Add(System.Linq.Expressions.Expression<System.Func<object>> accessor, string message) { }
-        public void Clear() { }
-        public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
-        public void Clear(System.Linq.Expressions.Expression<System.Func<object>> accessor) { }
-    }
-    public sealed partial class ValidationRequestedEventArgs : System.EventArgs
-    {
-        public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty;
-        public ValidationRequestedEventArgs() { }
-    }
-    public sealed partial class ValidationStateChangedEventArgs : System.EventArgs
-    {
-        public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty;
-        public ValidationStateChangedEventArgs() { }
-    }
-}
 namespace Microsoft.AspNetCore.Components.Rendering
 {
     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]

+ 3 - 7
src/Components/Components/src/Microsoft.AspNetCore.Components.csproj

@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk.Razor">
+<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
@@ -7,7 +7,6 @@
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <IsShippingPackage>true</IsShippingPackage>
     <IsAspNetCoreApp>true</IsAspNetCoreApp>
-    <RazorLangVersion>3.0</RazorLangVersion>
   </PropertyGroup>
 
   <ItemGroup>
@@ -16,12 +15,9 @@
   </ItemGroup>
 
   <ItemGroup>
-    <Reference Include="Microsoft.AspNetCore.Authorization" />
     <Reference Include="Microsoft.JSInterop" />
-  </ItemGroup>
-
-  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
-    <Reference Include="System.ComponentModel.Annotations" />
+    <Reference Include="Microsoft.Extensions.Logging.Abstractions" />
+    <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
   </ItemGroup>
 
   <Target Name="_GetNuspecDependencyPackageVersions">

+ 4 - 2
src/Components/Components/src/Properties/AssemblyInfo.cs

@@ -1,9 +1,11 @@
 using System.Runtime.CompilerServices;
 
 [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Blazor.Build.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
-[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
-[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Web.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
+[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Authorization.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
+[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Forms.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
 [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Performance, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
 [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Server.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
+[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
+[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Web.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
 [assembly: InternalsVisibleTo("Ignitor, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
 [assembly: InternalsVisibleTo("Ignitor.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

+ 4 - 0
src/Components/ComponentsNoDeps.slnf

@@ -4,6 +4,8 @@
     "projects": [
       "Analyzers\\src\\Microsoft.AspNetCore.Components.Analyzers.csproj",
       "Analyzers\\test\\Microsoft.AspNetCore.Components.Analyzers.Tests.csproj",
+      "Authorization\\src\\Microsoft.AspNetCore.Components.Authorization.csproj",
+      "Authorization\\test\\Microsoft.AspNetCore.Components.Authorization.Tests.csproj",
       "Blazor\\Blazor\\src\\Microsoft.AspNetCore.Blazor.csproj",
       "Blazor\\Blazor\\test\\Microsoft.AspNetCore.Blazor.Tests.csproj",
       "Blazor\\Build\\src\\Microsoft.AspNetCore.Blazor.Build.csproj",
@@ -19,6 +21,8 @@
       "Blazor\\testassets\\MonoSanityClient\\MonoSanityClient.csproj",
       "Blazor\\testassets\\MonoSanity\\MonoSanity.csproj",
       "Blazor\\testassets\\StandaloneApp\\StandaloneApp.csproj",
+      "Forms\\src\\Microsoft.AspNetCore.Components.Forms.csproj",
+      "Forms\\test\\Microsoft.AspNetCore.Components.Forms.Tests.csproj",
       "Web\\src\\Microsoft.AspNetCore.Components.Web.csproj",
       "Web\\test\\Microsoft.AspNetCore.Components.Web.Tests.csproj",
       "Components\\perf\\Microsoft.AspNetCore.Components.Performance.csproj",

+ 15 - 0
src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj

@@ -0,0 +1,15 @@
+<!-- This file is automatically generated. -->
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
+  </PropertyGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
+    <Compile Include="Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs" />
+    <Reference Include="Microsoft.AspNetCore.Components"  />
+    <Reference Include="System.ComponentModel.Annotations"  />
+  </ItemGroup>
+<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
+    <Compile Include="Microsoft.AspNetCore.Components.Forms.netcoreapp3.0.cs" />
+    <Reference Include="Microsoft.AspNetCore.Components"  />
+  </ItemGroup>
+</Project>

+ 75 - 0
src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp3.0.cs

@@ -0,0 +1,75 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.AspNetCore.Components.Forms
+{
+    public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase
+    {
+        public DataAnnotationsValidator() { }
+        protected override void OnInitialized() { }
+    }
+    public sealed partial class EditContext
+    {
+        public EditContext(object model) { }
+        public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.FieldChangedEventArgs> OnFieldChanged { add { } remove { } }
+        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs> OnValidationRequested { add { } remove { } }
+        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs> OnValidationStateChanged { add { } remove { } }
+        public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; }
+        public System.Collections.Generic.IEnumerable<string> GetValidationMessages() { throw null; }
+        public System.Collections.Generic.IEnumerable<string> GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; }
+        public System.Collections.Generic.IEnumerable<string> GetValidationMessages(System.Linq.Expressions.Expression<System.Func<object>> accessor) { throw null; }
+        public bool IsModified() { throw null; }
+        public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; }
+        public bool IsModified(System.Linq.Expressions.Expression<System.Func<object>> accessor) { throw null; }
+        public void MarkAsUnmodified() { }
+        public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
+        public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
+        public void NotifyValidationStateChanged() { }
+        public bool Validate() { throw null; }
+    }
+    public static partial class EditContextDataAnnotationsExtensions
+    {
+        public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; }
+    }
+    public sealed partial class FieldChangedEventArgs : System.EventArgs
+    {
+        public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
+        public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+    }
+    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+    public readonly partial struct FieldIdentifier : System.IEquatable<Microsoft.AspNetCore.Components.Forms.FieldIdentifier>
+    {
+        private readonly object _dummy;
+        public FieldIdentifier(object model, string fieldName) { throw null; }
+        public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+        public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+        public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create<TField>(System.Linq.Expressions.Expression<System.Func<TField>> accessor) { throw null; }
+        public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; }
+        public override bool Equals(object obj) { throw null; }
+        public override int GetHashCode() { throw null; }
+    }
+    public sealed partial class ValidationMessageStore
+    {
+        public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { }
+        public System.Collections.Generic.IEnumerable<string> this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } }
+        public System.Collections.Generic.IEnumerable<string> this[System.Linq.Expressions.Expression<System.Func<object>> accessor] { get { throw null; } }
+        public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable<string> messages) { }
+        public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { }
+        public void Add(System.Linq.Expressions.Expression<System.Func<object>> accessor, System.Collections.Generic.IEnumerable<string> messages) { }
+        public void Add(System.Linq.Expressions.Expression<System.Func<object>> accessor, string message) { }
+        public void Clear() { }
+        public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
+        public void Clear(System.Linq.Expressions.Expression<System.Func<object>> accessor) { }
+    }
+    public sealed partial class ValidationRequestedEventArgs : System.EventArgs
+    {
+        public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty;
+        public ValidationRequestedEventArgs() { }
+    }
+    public sealed partial class ValidationStateChangedEventArgs : System.EventArgs
+    {
+        public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty;
+        public ValidationStateChangedEventArgs() { }
+    }
+}

+ 75 - 0
src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs

@@ -0,0 +1,75 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.AspNetCore.Components.Forms
+{
+    public partial class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase
+    {
+        public DataAnnotationsValidator() { }
+        protected override void OnInitialized() { }
+    }
+    public sealed partial class EditContext
+    {
+        public EditContext(object model) { }
+        public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.FieldChangedEventArgs> OnFieldChanged { add { } remove { } }
+        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs> OnValidationRequested { add { } remove { } }
+        public event System.EventHandler<Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs> OnValidationStateChanged { add { } remove { } }
+        public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) { throw null; }
+        public System.Collections.Generic.IEnumerable<string> GetValidationMessages() { throw null; }
+        public System.Collections.Generic.IEnumerable<string> GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; }
+        public System.Collections.Generic.IEnumerable<string> GetValidationMessages(System.Linq.Expressions.Expression<System.Func<object>> accessor) { throw null; }
+        public bool IsModified() { throw null; }
+        public bool IsModified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { throw null; }
+        public bool IsModified(System.Linq.Expressions.Expression<System.Func<object>> accessor) { throw null; }
+        public void MarkAsUnmodified() { }
+        public void MarkAsUnmodified(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
+        public void NotifyFieldChanged(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
+        public void NotifyValidationStateChanged() { }
+        public bool Validate() { throw null; }
+    }
+    public static partial class EditContextDataAnnotationsExtensions
+    {
+        public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) { throw null; }
+    }
+    public sealed partial class FieldChangedEventArgs : System.EventArgs
+    {
+        public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
+        public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+    }
+    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+    public readonly partial struct FieldIdentifier : System.IEquatable<Microsoft.AspNetCore.Components.Forms.FieldIdentifier>
+    {
+        private readonly object _dummy;
+        public FieldIdentifier(object model, string fieldName) { throw null; }
+        public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+        public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+        public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create<TField>(System.Linq.Expressions.Expression<System.Func<TField>> accessor) { throw null; }
+        public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; }
+        public override bool Equals(object obj) { throw null; }
+        public override int GetHashCode() { throw null; }
+    }
+    public sealed partial class ValidationMessageStore
+    {
+        public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) { }
+        public System.Collections.Generic.IEnumerable<string> this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get { throw null; } }
+        public System.Collections.Generic.IEnumerable<string> this[System.Linq.Expressions.Expression<System.Func<object>> accessor] { get { throw null; } }
+        public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable<string> messages) { }
+        public void Add(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) { }
+        public void Add(System.Linq.Expressions.Expression<System.Func<object>> accessor, System.Collections.Generic.IEnumerable<string> messages) { }
+        public void Add(System.Linq.Expressions.Expression<System.Func<object>> accessor, string message) { }
+        public void Clear() { }
+        public void Clear(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
+        public void Clear(System.Linq.Expressions.Expression<System.Func<object>> accessor) { }
+    }
+    public sealed partial class ValidationRequestedEventArgs : System.EventArgs
+    {
+        public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty;
+        public ValidationRequestedEventArgs() { }
+    }
+    public sealed partial class ValidationStateChangedEventArgs : System.EventArgs
+    {
+        public static readonly new Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty;
+        public ValidationStateChangedEventArgs() { }
+    }
+}

+ 0 - 0
src/Components/Components/src/Forms/DataAnnotationsValidator.cs → src/Components/Forms/src/DataAnnotationsValidator.cs


+ 0 - 0
src/Components/Components/src/Forms/EditContext.cs → src/Components/Forms/src/EditContext.cs


+ 0 - 0
src/Components/Components/src/Forms/EditContextDataAnnotationsExtensions.cs → src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs


+ 0 - 0
src/Components/Components/src/Forms/FieldChangedEventArgs.cs → src/Components/Forms/src/FieldChangedEventArgs.cs


+ 0 - 0
src/Components/Components/src/Forms/FieldIdentifier.cs → src/Components/Forms/src/FieldIdentifier.cs


+ 0 - 0
src/Components/Components/src/Forms/FieldState.cs → src/Components/Forms/src/FieldState.cs


+ 20 - 0
src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj

@@ -0,0 +1,20 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
+    <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netcoreapp3.0</TargetFrameworks>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
+    <Description>Forms and validation support for Blazor applications.</Description>
+    <GenerateDocumentationFile>true</GenerateDocumentationFile>
+    <IsShippingPackage>true</IsShippingPackage>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <Reference Include="Microsoft.AspNetCore.Components" />
+  </ItemGroup>
+
+  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'" >
+    <Reference Include="System.ComponentModel.Annotations" />
+  </ItemGroup>
+
+</Project>

+ 0 - 0
src/Components/Components/src/Forms/ValidationMessageStore.cs → src/Components/Forms/src/ValidationMessageStore.cs


+ 0 - 0
src/Components/Components/src/Forms/ValidationRequestedEventArgs.cs → src/Components/Forms/src/ValidationRequestedEventArgs.cs


+ 0 - 0
src/Components/Components/src/Forms/ValidationStateChangedEventArgs.cs → src/Components/Forms/src/ValidationStateChangedEventArgs.cs


+ 0 - 0
src/Components/Components/test/Forms/EditContextDataAnnotationsExtensionsTest.cs → src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs


+ 0 - 0
src/Components/Components/test/Forms/EditContextTest.cs → src/Components/Forms/test/EditContextTest.cs


+ 0 - 0
src/Components/Components/test/Forms/FieldIdentifierTest.cs → src/Components/Forms/test/FieldIdentifierTest.cs


+ 17 - 0
src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj

@@ -0,0 +1,17 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netcoreapp3.0</TargetFramework>
+    <RootNamespace>Microsoft.AspNetCore.Components.Forms</RootNamespace>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <Reference Include="Microsoft.AspNetCore.Components.Forms" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <Compile Include="$(ComponentsSharedSourceRoot)test\**\*.cs" LinkBase="Helpers" />
+    <Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
+  </ItemGroup>
+
+</Project>

+ 0 - 0
src/Components/Components/test/Forms/ValidationMessageStoreTest.cs → src/Components/Forms/test/ValidationMessageStoreTest.cs


+ 1 - 0
src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj

@@ -5,6 +5,7 @@
   </PropertyGroup>
   <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
     <Compile Include="Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs" />
+    <Reference Include="Microsoft.AspNetCore.Components.Authorization"  />
     <Reference Include="Microsoft.AspNetCore.Components.Web"  />
     <Reference Include="Microsoft.AspNetCore.DataProtection"  />
     <Reference Include="Microsoft.AspNetCore.SignalR"  />

+ 4 - 4
src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs

@@ -41,13 +41,13 @@ namespace Microsoft.AspNetCore.Components.Server
         protected abstract System.TimeSpan RevalidationInterval { get; }
         protected virtual void Dispose(bool disposing) { }
         void System.IDisposable.Dispose() { }
-        protected abstract System.Threading.Tasks.Task<bool> ValidateAuthenticationStateAsync(Microsoft.AspNetCore.Components.AuthenticationState authenticationState, System.Threading.CancellationToken cancellationToken);
+        protected abstract System.Threading.Tasks.Task<bool> ValidateAuthenticationStateAsync(Microsoft.AspNetCore.Components.Authorization.AuthenticationState authenticationState, System.Threading.CancellationToken cancellationToken);
     }
-    public partial class ServerAuthenticationStateProvider : Microsoft.AspNetCore.Components.AuthenticationStateProvider, Microsoft.AspNetCore.Components.IHostEnvironmentAuthenticationStateProvider
+    public partial class ServerAuthenticationStateProvider : Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider, Microsoft.AspNetCore.Components.Authorization.IHostEnvironmentAuthenticationStateProvider
     {
         public ServerAuthenticationStateProvider() { }
-        public override System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> GetAuthenticationStateAsync() { throw null; }
-        public void SetAuthenticationState(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.AuthenticationState> authenticationStateTask) { }
+        public override System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> GetAuthenticationStateAsync() { throw null; }
+        public void SetAuthenticationState(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> authenticationStateTask) { }
     }
 }
 namespace Microsoft.AspNetCore.Components.Server.Circuits

+ 1 - 0
src/Components/Server/src/Circuits/CircuitHost.cs

@@ -6,6 +6,7 @@ using System.Collections.Generic;
 using System.Security.Claims;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components.Authorization;
 using Microsoft.AspNetCore.Components.Web;
 using Microsoft.AspNetCore.Components.Web.Rendering;
 using Microsoft.AspNetCore.SignalR;

+ 1 - 0
src/Components/Server/src/Circuits/RevalidatingServerAuthenticationStateProvider.cs

@@ -5,6 +5,7 @@ using System;
 using System.Security.Claims;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components.Authorization;
 using Microsoft.Extensions.Logging;
 
 namespace Microsoft.AspNetCore.Components.Server

+ 1 - 0
src/Components/Server/src/Circuits/ServerAuthenticationStateProvider.cs

@@ -3,6 +3,7 @@
 
 using System;
 using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components.Authorization;
 
 namespace Microsoft.AspNetCore.Components.Server
 {

+ 1 - 0
src/Components/Server/src/DependencyInjection/ComponentServiceCollectionExtensions.cs

@@ -4,6 +4,7 @@
 using System;
 using Microsoft.AspNetCore.Builder;
 using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Authorization;
 using Microsoft.AspNetCore.Components.Routing;
 using Microsoft.AspNetCore.Components.Server;
 using Microsoft.AspNetCore.Components.Server.BlazorPack;

+ 2 - 1
src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj

@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
     <TargetFramework>netcoreapp3.0</TargetFramework>
@@ -12,6 +12,7 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <Reference Include="Microsoft.AspNetCore.Components.Authorization" />
     <Reference Include="Microsoft.AspNetCore.Components.Web" />
     <Reference Include="Microsoft.AspNetCore.DataProtection" />
     <Reference Include="Microsoft.AspNetCore.SignalR" />

+ 1 - 0
src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProvider.cs

@@ -7,6 +7,7 @@ using System.Linq;
 using System.Security.Claims;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components.Authorization;
 using Microsoft.AspNetCore.Components.Server;
 using Microsoft.Extensions.Logging.Abstractions;
 using Xunit;

+ 1 - 0
src/Components/Server/test/Circuits/ServerAuthenticationStateProviderTest.cs

@@ -4,6 +4,7 @@
 using System;
 using System.Security.Claims;
 using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components.Authorization;
 using Microsoft.AspNetCore.Components.Server.Circuits;
 using Xunit;
 

+ 2 - 0
src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj

@@ -6,11 +6,13 @@
   <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
     <Compile Include="Microsoft.AspNetCore.Components.Web.netstandard2.0.cs" />
     <Reference Include="Microsoft.AspNetCore.Components"  />
+    <Reference Include="Microsoft.AspNetCore.Components.Forms"  />
     <Reference Include="Microsoft.Extensions.DependencyInjection"  />
   </ItemGroup>
 <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
     <Compile Include="Microsoft.AspNetCore.Components.Web.netcoreapp3.0.cs" />
     <Reference Include="Microsoft.AspNetCore.Components"  />
+    <Reference Include="Microsoft.AspNetCore.Components.Forms"  />
     <Reference Include="Microsoft.Extensions.DependencyInjection"  />
   </ItemGroup>
 </Project>

+ 1 - 0
src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj

@@ -12,6 +12,7 @@
 
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Components" />
+    <Reference Include="Microsoft.AspNetCore.Components.Forms" />
     <Reference Include="Microsoft.Extensions.DependencyInjection" />
   </ItemGroup>
 

+ 1 - 0
src/Components/test/testassets/BasicTestApp/AuthTest/AuthRouter.razor

@@ -1,3 +1,4 @@
+@using Microsoft.AspNetCore.Components.Authorization
 @using Microsoft.AspNetCore.Components.Routing
 @inject NavigationManager NavigationManager
 

+ 1 - 0
src/Components/test/testassets/BasicTestApp/AuthTest/AuthorizeViewCases.razor

@@ -1,4 +1,5 @@
 @page "/AuthorizeViewCases"
+@using Microsoft.AspNetCore.Components.Authorization
 
 <div id="no-authorization-rule">
     <h3>Scenario: No authorization rule</h3>

+ 1 - 0
src/Components/test/testassets/BasicTestApp/AuthTest/CascadingAuthenticationStateConsumer.razor

@@ -1,5 +1,6 @@
 @page "/CascadingAuthenticationStateConsumer"
 @using System.Security.Claims
+@using Microsoft.AspNetCore.Components.Authorization
 
 <h1>Cascading authentication state</h1>
 

+ 1 - 0
src/Components/test/testassets/BasicTestApp/AuthTest/ServerAuthenticationStateProvider.cs

@@ -7,6 +7,7 @@ using System.Net.Http;
 using System.Security.Claims;
 using System.Threading.Tasks;
 using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Authorization;
 
 namespace BasicTestApp.AuthTest
 {

+ 1 - 0
src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj

@@ -16,6 +16,7 @@
     <Reference Include="System.ComponentModel" />
     <Reference Include="Microsoft.AspNetCore.Blazor" />
     <Reference Include="Microsoft.AspNetCore.Blazor.HttpClient" />
+    <Reference Include="Microsoft.AspNetCore.Components.Authorization" />
   </ItemGroup>
 
   <ItemGroup>

+ 1 - 0
src/Components/test/testassets/BasicTestApp/PrerenderedToInteractiveTransition.razor

@@ -1,5 +1,6 @@
 @page "/prerendered-transition"
 @using Microsoft.AspNetCore.Components
+@using Microsoft.AspNetCore.Components.Authorization
 @inject IComponentContext ComponentContext
 
 <CascadingAuthenticationState>

+ 1 - 0
src/Components/test/testassets/BasicTestApp/Startup.cs

@@ -5,6 +5,7 @@ using System.Runtime.InteropServices;
 using BasicTestApp.AuthTest;
 using Microsoft.AspNetCore.Blazor.Http;
 using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Authorization;
 using Microsoft.AspNetCore.Components.Builder;
 using Microsoft.Extensions.DependencyInjection;
 

+ 1 - 0
src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj

@@ -12,5 +12,6 @@
     <Reference Include="Microsoft.AspNetCore.Html.Abstractions"  />
     <Reference Include="Microsoft.Extensions.WebEncoders"  />
     <Reference Include="Microsoft.AspNetCore.Components"  />
+    <Reference Include="Microsoft.AspNetCore.Components.Authorization"  />
   </ItemGroup>
 </Project>

+ 1 - 0
src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj

@@ -23,6 +23,7 @@ Microsoft.AspNetCore.Mvc.ViewComponent</Description>
     <Reference Include="Microsoft.AspNetCore.Html.Abstractions" />
     <Reference Include="Microsoft.Extensions.WebEncoders" />
     <Reference Include="Microsoft.AspNetCore.Components" />
+    <Reference Include="Microsoft.AspNetCore.Components.Authorization" />
   </ItemGroup>
 
 </Project>

+ 1 - 0
src/Mvc/Mvc.ViewFeatures/src/RazorComponents/StaticComponentRenderer.cs

@@ -6,6 +6,7 @@ using System.Collections.Generic;
 using System.Text.Encodings.Web;
 using System.Threading.Tasks;
 using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Authorization;
 using Microsoft.AspNetCore.Components.Rendering;
 using Microsoft.AspNetCore.Components.Routing;
 using Microsoft.AspNetCore.Http;

+ 1 - 0
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Areas/Identity/RevalidatingIdentityAuthenticationStateProvider.cs

@@ -3,6 +3,7 @@ using System.Security.Claims;
 using System.Threading;
 using System.Threading.Tasks;
 using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Authorization;
 using Microsoft.AspNetCore.Components.Server;
 using Microsoft.AspNetCore.Identity;
 using Microsoft.Extensions.DependencyInjection;

+ 1 - 0
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Startup.cs

@@ -18,6 +18,7 @@ using Microsoft.AspNetCore.Authentication.AzureADB2C.UI;
 using Microsoft.AspNetCore.Builder;
 using Microsoft.AspNetCore.Components;
 #if (IndividualLocalAuth)
+using Microsoft.AspNetCore.Components.Authorization;
 using Microsoft.AspNetCore.Identity;
 using Microsoft.AspNetCore.Identity.UI;
 #endif

+ 1 - 0
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/_Imports.razor

@@ -1,5 +1,6 @@
 @using System.Net.Http
 @using Microsoft.AspNetCore.Authorization
+@using Microsoft.AspNetCore.Components.Authorization
 @using Microsoft.AspNetCore.Components.Forms
 @using Microsoft.AspNetCore.Components.Routing
 @using Microsoft.JSInterop