Skip to content

Commit a4ab9ff

Browse files
SteveSandersonMSJohn Luo
authored andcommitted
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
1 parent b9584d5 commit a4ab9ff

File tree

75 files changed

+523
-305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+523
-305
lines changed

eng/ProjectReferences.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,12 @@
131131
<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" />
132132
<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" />
133133
<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" />
134+
<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" />
134135
<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" />
135136
<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" />
136137
<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" />
137138
<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" />
139+
<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" />
138140
<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" />
139141
<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" />
140142
</ItemGroup>

eng/SharedFramework.Local.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Http.Connections.Common" />
2323
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.SignalR.Protocols.Json" />
2424
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.SignalR.Common" />
25+
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Authorization" />
2526
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components" />
27+
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Forms" />
2628
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Web" />
2729

2830
<!-- These assemblies are only in the shared framework -->
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!-- This file is automatically generated. -->
2+
<Project Sdk="Microsoft.NET.Sdk">
3+
<PropertyGroup>
4+
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
5+
</PropertyGroup>
6+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
7+
<Compile Include="Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs" />
8+
<Reference Include="Microsoft.AspNetCore.Authorization" />
9+
<Reference Include="Microsoft.AspNetCore.Components" />
10+
</ItemGroup>
11+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
12+
<Compile Include="Microsoft.AspNetCore.Components.Authorization.netcoreapp3.0.cs" />
13+
<Reference Include="Microsoft.AspNetCore.Authorization" />
14+
<Reference Include="Microsoft.AspNetCore.Components" />
15+
</ItemGroup>
16+
</Project>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
namespace Microsoft.AspNetCore.Components.Authorization
5+
{
6+
public partial class AuthenticationState
7+
{
8+
public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { }
9+
public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
10+
}
11+
public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> task);
12+
public abstract partial class AuthenticationStateProvider
13+
{
14+
protected AuthenticationStateProvider() { }
15+
public event Microsoft.AspNetCore.Components.Authorization.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } }
16+
public abstract System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> GetAuthenticationStateAsync();
17+
protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> task) { }
18+
}
19+
public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView
20+
{
21+
public AuthorizeRouteView() { }
22+
[Microsoft.AspNetCore.Components.ParameterAttribute]
23+
public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
24+
[Microsoft.AspNetCore.Components.ParameterAttribute]
25+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
26+
protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
27+
}
28+
public partial class AuthorizeView : Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore
29+
{
30+
public AuthorizeView() { }
31+
[Microsoft.AspNetCore.Components.ParameterAttribute]
32+
public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
33+
[Microsoft.AspNetCore.Components.ParameterAttribute]
34+
public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
35+
protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; }
36+
}
37+
public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase
38+
{
39+
protected AuthorizeViewCore() { }
40+
[Microsoft.AspNetCore.Components.ParameterAttribute]
41+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
42+
[Microsoft.AspNetCore.Components.ParameterAttribute]
43+
public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
44+
[Microsoft.AspNetCore.Components.ParameterAttribute]
45+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
46+
[Microsoft.AspNetCore.Components.ParameterAttribute]
47+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
48+
[Microsoft.AspNetCore.Components.ParameterAttribute]
49+
public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
50+
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
51+
protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData();
52+
[System.Diagnostics.DebuggerStepThroughAttribute]
53+
protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; }
54+
}
55+
public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
56+
{
57+
public CascadingAuthenticationState() { }
58+
[Microsoft.AspNetCore.Components.ParameterAttribute]
59+
public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
60+
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
61+
protected override void OnInitialized() { }
62+
void System.IDisposable.Dispose() { }
63+
}
64+
public partial interface IHostEnvironmentAuthenticationStateProvider
65+
{
66+
void SetAuthenticationState(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> authenticationStateTask);
67+
}
68+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
namespace Microsoft.AspNetCore.Components.Authorization
5+
{
6+
public partial class AuthenticationState
7+
{
8+
public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { }
9+
public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
10+
}
11+
public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> task);
12+
public abstract partial class AuthenticationStateProvider
13+
{
14+
protected AuthenticationStateProvider() { }
15+
public event Microsoft.AspNetCore.Components.Authorization.AuthenticationStateChangedHandler AuthenticationStateChanged { add { } remove { } }
16+
public abstract System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> GetAuthenticationStateAsync();
17+
protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> task) { }
18+
}
19+
public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView
20+
{
21+
public AuthorizeRouteView() { }
22+
[Microsoft.AspNetCore.Components.ParameterAttribute]
23+
public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
24+
[Microsoft.AspNetCore.Components.ParameterAttribute]
25+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
26+
protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
27+
}
28+
public partial class AuthorizeView : Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore
29+
{
30+
public AuthorizeView() { }
31+
[Microsoft.AspNetCore.Components.ParameterAttribute]
32+
public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
33+
[Microsoft.AspNetCore.Components.ParameterAttribute]
34+
public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
35+
protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; }
36+
}
37+
public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase
38+
{
39+
protected AuthorizeViewCore() { }
40+
[Microsoft.AspNetCore.Components.ParameterAttribute]
41+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
42+
[Microsoft.AspNetCore.Components.ParameterAttribute]
43+
public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
44+
[Microsoft.AspNetCore.Components.ParameterAttribute]
45+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
46+
[Microsoft.AspNetCore.Components.ParameterAttribute]
47+
public Microsoft.AspNetCore.Components.RenderFragment<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
48+
[Microsoft.AspNetCore.Components.ParameterAttribute]
49+
public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
50+
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
51+
protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData();
52+
[System.Diagnostics.DebuggerStepThroughAttribute]
53+
protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; }
54+
}
55+
public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
56+
{
57+
public CascadingAuthenticationState() { }
58+
[Microsoft.AspNetCore.Components.ParameterAttribute]
59+
public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
60+
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
61+
protected override void OnInitialized() { }
62+
void System.IDisposable.Dispose() { }
63+
}
64+
public partial interface IHostEnvironmentAuthenticationStateProvider
65+
{
66+
void SetAuthenticationState(System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Authorization.AuthenticationState> authenticationStateTask);
67+
}
68+
}

src/Components/Components/src/Auth/AttributeAuthorizeDataCache.cs renamed to src/Components/Authorization/src/AttributeAuthorizeDataCache.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
using System;
55
using System.Collections.Concurrent;
66
using System.Linq;
7-
using System.Reflection;
87
using Microsoft.AspNetCore.Authorization;
98

10-
namespace Microsoft.AspNetCore.Components.Auth
9+
namespace Microsoft.AspNetCore.Components.Authorization
1110
{
1211
internal static class AttributeAuthorizeDataCache
1312
{

src/Components/Components/src/Auth/AuthenticationState.cs renamed to src/Components/Authorization/src/AuthenticationState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System;
55
using System.Security.Claims;
66

7-
namespace Microsoft.AspNetCore.Components
7+
namespace Microsoft.AspNetCore.Components.Authorization
88
{
99
/// <summary>
1010
/// Provides information about the currently authenticated user, if any.

src/Components/Components/src/Auth/AuthenticationStateProvider.cs renamed to src/Components/Authorization/src/AuthenticationStateProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System;
55
using System.Threading.Tasks;
66

7-
namespace Microsoft.AspNetCore.Components
7+
namespace Microsoft.AspNetCore.Components.Authorization
88
{
99
/// <summary>
1010
/// Provides information about the authentication state of the current user.

src/Components/Components/src/Auth/AuthorizeDataAdapter.cs renamed to src/Components/Authorization/src/AuthorizeDataAdapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System;
55
using Microsoft.AspNetCore.Authorization;
66

7-
namespace Microsoft.AspNetCore.Components
7+
namespace Microsoft.AspNetCore.Components.Authorization
88
{
99
// This is so the AuthorizeView can avoid implementing IAuthorizeData (even privately)
1010
internal class AuthorizeDataAdapter : IAuthorizeData

src/Components/Components/src/Auth/AuthorizeRouteView.cs renamed to src/Components/Authorization/src/AuthorizeRouteView.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33

44
using System.Threading.Tasks;
55
using Microsoft.AspNetCore.Authorization;
6-
using Microsoft.AspNetCore.Components.Auth;
76
using Microsoft.AspNetCore.Components.Rendering;
87

9-
namespace Microsoft.AspNetCore.Components
8+
namespace Microsoft.AspNetCore.Components.Authorization
109
{
1110
/// <summary>
1211
/// Combines the behaviors of <see cref="AuthorizeView"/> and <see cref="RouteView"/>,

src/Components/Components/src/Auth/AuthorizeView.cs renamed to src/Components/Authorization/src/AuthorizeView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using Microsoft.AspNetCore.Authorization;
55

6-
namespace Microsoft.AspNetCore.Components
6+
namespace Microsoft.AspNetCore.Components.Authorization
77
{
88
/// <summary>
99
/// Displays differing content depending on the user's authorization status.

src/Components/Components/src/Auth/AuthorizeViewCore.cs renamed to src/Components/Authorization/src/AuthorizeViewCore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Microsoft.AspNetCore.Authorization;
88
using Microsoft.AspNetCore.Components.Rendering;
99

10-
namespace Microsoft.AspNetCore.Components
10+
namespace Microsoft.AspNetCore.Components.Authorization
1111
{
1212
/// <summary>
1313
/// A base class for components that display differing content depending on the user's authorization status.

src/Components/Components/src/Auth/CascadingAuthenticationState.razor renamed to src/Components/Authorization/src/CascadingAuthenticationState.razor

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@namespace Microsoft.AspNetCore.Components
21
@implements IDisposable
32
@inject AuthenticationStateProvider AuthenticationStateProvider
43

src/Components/Components/src/Auth/IHostEnvironmentAuthenticationStateProvider.cs renamed to src/Components/Authorization/src/IHostEnvironmentAuthenticationStateProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using System.Threading.Tasks;
55

6-
namespace Microsoft.AspNetCore.Components
6+
namespace Microsoft.AspNetCore.Components.Authorization
77
{
88
/// <summary>
99
/// An interface implemented by <see cref="AuthenticationStateProvider"/> classes that can receive authentication
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Razor">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
5+
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netcoreapp3.0</TargetFrameworks>
6+
<IsAspNetCoreApp>true</IsAspNetCoreApp>
7+
<Description>Authentication and authorization support for Blazor applications.</Description>
8+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
9+
<IsShippingPackage>true</IsShippingPackage>
10+
<RazorLangVersion>3.0</RazorLangVersion>
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<Reference Include="Microsoft.AspNetCore.Authorization" />
15+
<Reference Include="Microsoft.AspNetCore.Components" />
16+
</ItemGroup>
17+
18+
</Project>

src/Components/Components/test/Auth/AuthorizeRouteViewTest.cs renamed to src/Components/Authorization/test/AuthorizeRouteViewTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using Microsoft.Extensions.DependencyInjection;
1313
using Xunit;
1414

15-
namespace Microsoft.AspNetCore.Components
15+
namespace Microsoft.AspNetCore.Components.Authorization
1616
{
1717
public class AuthorizeRouteViewTest
1818
{

0 commit comments

Comments
 (0)