Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protected Browser Storage #23553

Merged
merged 14 commits into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eng/ProjectReferences.props
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
<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.Extensions" ProjectPath="$(RepoRoot)src\Components\Web.Extensions\src\Microsoft.AspNetCore.Components.Web.Extensions.csproj" RefProjectPath="$(RepoRoot)src\Components\Web.Extensions\ref\Microsoft.AspNetCore.Components.Web.Extensions.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" />
<ProjectReferenceProvider Include="Microsoft.Extensions.FileProviders.Embedded" ProjectPath="$(RepoRoot)src\FileProviders\Embedded\src\Microsoft.Extensions.FileProviders.Embedded.csproj" RefProjectPath="$(RepoRoot)src\FileProviders\Embedded\ref\Microsoft.Extensions.FileProviders.Embedded.csproj" />
<ProjectReferenceProvider Include="Microsoft.Extensions.Configuration.KeyPerFile" ProjectPath="$(RepoRoot)src\Configuration.KeyPerFile\src\Microsoft.Extensions.Configuration.KeyPerFile.csproj" RefProjectPath="$(RepoRoot)src\Configuration.KeyPerFile\ref\Microsoft.Extensions.Configuration.KeyPerFile.csproj" />
Expand Down
1 change: 1 addition & 0 deletions eng/SharedFramework.Local.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Authorization" />
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components" />
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Forms" />
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Web.Extensions" />
MackinnonBuck marked this conversation as resolved.
Show resolved Hide resolved
<AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Web" />
<AspNetCoreAppReferenceAndPackage Include="Microsoft.Extensions.FileProviders.Embedded" />
<AspNetCoreAppReferenceAndPackage Include="Microsoft.Extensions.Configuration.KeyPerFile" />
Expand Down
32 changes: 32 additions & 0 deletions src/Components/Components.sln
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wasm.Authentication.Shared"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.JSInterop", "..\JSInterop\Microsoft.JSInterop\src\Microsoft.JSInterop.csproj", "{A062ACCE-AB0D-4569-9548-4BC0D9A9174B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web.Extensions", "Web.Extensions", "{EDA58361-CABB-4050-9F5E-5889A260DB61}"
MackinnonBuck marked this conversation as resolved.
Show resolved Hide resolved
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Web.Extensions", "Web.Extensions\src\Microsoft.AspNetCore.Components.Web.Extensions.csproj", "{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Web.Extensions.Tests", "Web.Extensions\test\Microsoft.AspNetCore.Components.Web.Extensions.Tests.csproj", "{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}"
EndProject
MackinnonBuck marked this conversation as resolved.
Show resolved Hide resolved
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1557,6 +1563,30 @@ Global
{A062ACCE-AB0D-4569-9548-4BC0D9A9174B}.Release|x64.Build.0 = Release|Any CPU
{A062ACCE-AB0D-4569-9548-4BC0D9A9174B}.Release|x86.ActiveCfg = Release|Any CPU
{A062ACCE-AB0D-4569-9548-4BC0D9A9174B}.Release|x86.Build.0 = Release|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Debug|x64.ActiveCfg = Debug|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Debug|x64.Build.0 = Debug|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Debug|x86.ActiveCfg = Debug|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Debug|x86.Build.0 = Debug|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Release|Any CPU.Build.0 = Release|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Release|x64.ActiveCfg = Release|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Release|x64.Build.0 = Release|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Release|x86.ActiveCfg = Release|Any CPU
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE}.Release|x86.Build.0 = Release|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Debug|x64.ActiveCfg = Debug|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Debug|x64.Build.0 = Debug|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Debug|x86.ActiveCfg = Debug|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Debug|x86.Build.0 = Debug|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Release|Any CPU.Build.0 = Release|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Release|x64.ActiveCfg = Release|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Release|x64.Build.0 = Release|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Release|x86.ActiveCfg = Release|Any CPU
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1676,6 +1706,8 @@ Global
{5F12F7B9-70BE-48F6-922A-3A1E87EE6BF0} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10}
{630D5388-7A2F-42DD-9154-1F62A18CBB69} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10}
{A062ACCE-AB0D-4569-9548-4BC0D9A9174B} = {2FC10057-7A0A-4E34-8302-879925BC0102}
{6B51318F-B060-48FE-BE3C-F3F5DC4381DE} = {EDA58361-CABB-4050-9F5E-5889A260DB61}
{9F06DFD0-2DFB-4E43-85A6-939DC84688CC} = {EDA58361-CABB-4050-9F5E-5889A260DB61}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CC3C47E1-AD1A-4619-9CD3-E08A0148E5CE}
Expand Down
1 change: 1 addition & 0 deletions src/Components/Components/src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
[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("Microsoft.AspNetCore.Components.Web.Extensions.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- This file is automatically generated. -->
MackinnonBuck marked this conversation as resolved.
Show resolved Hide resolved
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<Nullable>annotations</Nullable>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
<Compile Include="Microsoft.AspNetCore.Components.Web.Extensions.netcoreapp.cs" />
<Reference Include="Microsoft.AspNetCore.DataProtection" />
<Reference Include="Microsoft.JSInterop" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// 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.Web.Extensions
{
public abstract partial class ProtectedBrowserStorage
{
protected ProtectedBrowserStorage(string storeName, Microsoft.JSInterop.IJSRuntime jsRuntime, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider) { }
public System.Threading.Tasks.ValueTask DeleteAsync(string key) { throw null; }
public System.Threading.Tasks.ValueTask<T> GetValueOrDefaultAsync<T>(string key) { throw null; }
[System.Diagnostics.DebuggerStepThroughAttribute]
public System.Threading.Tasks.ValueTask<T> GetValueOrDefaultAsync<T>(string purpose, string key) { throw null; }
public System.Threading.Tasks.ValueTask SetAsync(string key, object value) { throw null; }
public System.Threading.Tasks.ValueTask SetAsync(string purpose, string key, object value) { throw null; }
public System.Threading.Tasks.ValueTask<(bool success, T result)> TryGetAsync<T>(string key) { throw null; }
[System.Diagnostics.DebuggerStepThroughAttribute]
public System.Threading.Tasks.ValueTask<(bool success, T result)> TryGetAsync<T>(string purpose, string key) { throw null; }
}
public partial class ProtectedLocalStorage : Microsoft.AspNetCore.Components.Web.Extensions.ProtectedBrowserStorage
{
public ProtectedLocalStorage(Microsoft.JSInterop.IJSRuntime jsRuntime, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider) : base (default(string), default(Microsoft.JSInterop.IJSRuntime), default(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider)) { }
}
public partial class ProtectedSessionStorage : Microsoft.AspNetCore.Components.Web.Extensions.ProtectedBrowserStorage
{
public ProtectedSessionStorage(Microsoft.JSInterop.IJSRuntime jsRuntime, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider) : base (default(string), default(Microsoft.JSInterop.IJSRuntime), default(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider)) { }
}
}
namespace Microsoft.Extensions.DependencyInjection
{
public static partial class ProtectedBrowserStorageServiceCollectionExtensions
{
public static void AddProtectedBrowserStorage(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
MackinnonBuck marked this conversation as resolved.
Show resolved Hide resolved
<Description>Support for rendering ASP.NET Core components for browsers.</Description>
MackinnonBuck marked this conversation as resolved.
Show resolved Hide resolved
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RootNamespace>Microsoft.AspNetCore.Components</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Reference Include="Microsoft.AspNetCore.DataProtection" />
<Reference Include="Microsoft.JSInterop" />
</ItemGroup>

</Project>
Loading