Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 6 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@
<RepoRoot Condition=" '$(RepoRoot)' == '' OR !HasTrailingSlash('$(RepoRoot)') ">$(MSBuildThisFileDirectory)</RepoRoot>
</PropertyGroup>

<PropertyGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
<PackageIcon>federation-logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
<None Include="$(RepoRoot)\assets\federation-logo.png" Pack="true" PackagePath="\" />
<None Include="$(RepoRoot)\assets\federation-logo.png" Pack="true" PackagePath="\"/>
</ItemGroup>
</Project>
7 changes: 1 addition & 6 deletions Federation/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@
<RootNamespace>Wangkanai.Federation</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
<PackageIcon>federation-logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="$(RepoRoot)\Federation\README.md" Pack="true" PackagePath="/" />
</ItemGroup>

</Project>
8 changes: 1 addition & 7 deletions Identity/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
<Title>Wangkanai Identity</Title>
<PackageTags>aspnetcore;identity;model;</PackageTags>
<Description>Introducing `Identity`, your essential toolkit for OpenID Connect and OAuth 2 integration in ASP.NET Core. Simplify your authentication and authorization systems with our handpicked collection of helper models. Whether for enterprise-level applications or personal projects, `Identity` offers versatility and ease-of-use. Discover Identity and take your security implementation to new heights.</Description>
<PackageProjectUrl>https://github.com/wangkanai/wangkanai/tree/main/Identity</PackageProjectUrl>
</PropertyGroup>

<PropertyGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
<PackageIcon>federation-logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
<None Include="..\\README.md" Pack="true" PackagePath="\" />
<None Include="$(RepoRoot)\Identity\README.md" Pack="true" PackagePath="/" />
</ItemGroup>

</Project>
13 changes: 4 additions & 9 deletions Security/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<Description>Enhance your ASP.NET Core applications with Security, an extension to the native ASP.NET Core Security. This library brings advanced features for a comprehensive and proactive security solution.</Description>
</PropertyGroup>

<ItemGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
<None Include="$(RepoRoot)\Security\README.md" Pack="true" PackagePath="\"/>
Comment thread
wangkanai marked this conversation as resolved.
</ItemGroup>

<PropertyGroup>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>
Expand All @@ -23,13 +27,4 @@
</ItemGroup>
</Target>

<PropertyGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
<PackageIcon>wangkanai-logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
<None Include="..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

</Project>
24 changes: 12 additions & 12 deletions Security/src/Core/PrivateNetworkPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ namespace Wangkanai.Security;

public class PrivateNetworkPolicy
{
public IReadOnlyList<IAuthorizationRequirement> Requirements { get; }
public IReadOnlyList<string> AuthenticationSchemes { get; }
public IReadOnlyList<IAuthorizationRequirement> Requirements { get; }
public IReadOnlyList<string> AuthenticationSchemes { get; }

public PrivateNetworkPolicy(IEnumerable<IAuthorizationRequirement> requirements, IEnumerable<string> authenticationSchemes)
{
requirements.ThrowIfNull();
authenticationSchemes.ThrowIfNull();
public PrivateNetworkPolicy(IEnumerable<IAuthorizationRequirement> requirements, IEnumerable<string> authenticationSchemes)
{
requirements.ThrowIfNull();
authenticationSchemes.ThrowIfNull();

if (!requirements.Any())
throw new InvalidOperationException(SecurityResources.Exception_PrivateNetworkPolicyEmpty);
if (!requirements.Any())
throw new InvalidOperationException(SecurityResources.Exception_PrivateNetworkPolicyEmpty);

Requirements = new List<IAuthorizationRequirement>(requirements).AsReadOnly();
AuthenticationSchemes = new List<string>(authenticationSchemes).AsReadOnly();
}
}
Requirements = new List<IAuthorizationRequirement>(requirements).AsReadOnly();
AuthenticationSchemes = new List<string>(authenticationSchemes).AsReadOnly();
}
}
Loading