Skip to content

Commit 5c6d592

Browse files
Merge pull request #106 from Genocs/ver_600
Ver 600
2 parents efc5040 + 2e5eb47 commit 5c6d592

File tree

55 files changed

+252
-615
lines changed

Some content is hidden

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

55 files changed

+252
-615
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
#### [v6.3.0](https://github.com/Genocs/genocs-library/compare/v6.2.0...v6.3.0)
8+
9+
> 3 November 2024
10+
11+
- Update project files and package references [`34415fa`](https://github.com/Genocs/genocs-library/commit/34415fa90e252c2654ddeebf5a8f84789d29be20)
12+
- Update Genocs packages from 6.2.0 to 6.3.0 [`950efdb`](https://github.com/Genocs/genocs-library/commit/950efdb79522da4661f8fba43d020d07e4a6d927)
13+
- Update package versions to 6.2.0 in multiple projects [`328f67e`](https://github.com/Genocs/genocs-library/commit/328f67e3a0f1ceb1be16be1d7eff0c679c5e5a8e)
14+
- Update project references and improve domain entities [`24589b4`](https://github.com/Genocs/genocs-library/commit/24589b4a5cc52bb99609c3089b2e366343f5688e)
15+
- Update Roslynator.Analyzers and adjust framework references [`6e9af26`](https://github.com/Genocs/genocs-library/commit/6e9af26c48bad5298f20430eca65f06b0a2c99f4)
16+
- Update to 6.2.0, replace Jaeger with OpenTelemetry [`ee78547`](https://github.com/Genocs/genocs-library/commit/ee785472f89c00bb5e53ad066b9d7b8b2588fffa)
17+
- Update packages, enhance JWT options, and refactor configs [`ded3efb`](https://github.com/Genocs/genocs-library/commit/ded3efb09cdb4b9b42b5d36102cf45bea608e84c)
18+
719
#### [v6.2.0](https://github.com/Genocs/genocs-library/compare/v6.1.0...v6.2.0)
820

921
> 22 October 2024

Directory.Build.props

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)dotnet.ruleset</CodeAnalysisRuleSet>
1010
<GenerateDocumentationFile>True</GenerateDocumentationFile>
1111
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
12+
<Version>6.3.0</Version>
1213
<LangVersion>10.0</LangVersion>
1314
<Company>Genocs</Company>
1415
<Copyright>Genocs 2024</Copyright>
@@ -21,7 +22,7 @@
2122
</PropertyGroup>
2223

2324
<ItemGroup>
24-
<PackageReference Include="Roslynator.Analyzers" Version="4.12.8">
25+
<PackageReference Include="Roslynator.Analyzers" Version="4.12.9">
2526
<PrivateAssets>all</PrivateAssets>
2627
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2728
</PackageReference>
@@ -35,6 +36,21 @@
3536
<AdditionalFiles Include="$(MSBuildThisFileDirectory).editorconfig" Link="Properties\.editorconfig" />
3637
</ItemGroup>
3738

39+
<ItemGroup>
40+
<None Include="..\..\LICENSE">
41+
<Pack>True</Pack>
42+
<PackagePath>\</PackagePath>
43+
</None>
44+
<None Include="..\..\icon.png">
45+
<Pack>True</Pack>
46+
<PackagePath>\</PackagePath>
47+
</None>
48+
<None Include="README_NUGET.md">
49+
<Pack>True</Pack>
50+
<PackagePath>\</PackagePath>
51+
</None>
52+
</ItemGroup>
53+
3854
<!--
3955
This Directory.Build.props files sets default properties that apply to all projects found in
4056
this folder or subfolders, recursively.

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "7.0.0",
3+
"version": "8.0.10",
44
"rollForward": "latestMajor",
55
"allowPrerelease": true
66
}

src/Genocs.Auth/Configurations/JwtOptions.cs

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,41 @@ public class JwtOptions
3838
public string? ValidIssuer { get; set; }
3939
public IEnumerable<string>? ValidIssuers { get; set; }
4040
public bool ValidateActor { get; set; }
41-
public bool ValidateAudience { get; set; }
42-
public bool ValidateIssuer { get; set; }
41+
42+
/// <summary>
43+
/// It defines whether the audience should be validated.
44+
/// Defaults to true.
45+
/// </summary>
46+
public bool ValidateAudience { get; set; } = true;
47+
48+
/// <summary>
49+
/// It defines whether the issuer should be validated.
50+
/// Defaults to true.
51+
/// </summary>
52+
public bool ValidateIssuer { get; set; } = true;
4353
public bool ValidateLifetime { get; set; } = true;
4454
public bool ValidateTokenReplay { get; set; }
4555
public bool ValidateIssuerSigningKey { get; set; }
56+
57+
/// <summary>
58+
/// It defines whether the token should be refreshed when the issuer key is not found.
59+
/// Defaults to true.
60+
/// </summary>
4661
public bool RefreshOnIssuerKeyNotFound { get; set; } = true;
62+
63+
/// <summary>
64+
/// It defines whether the error details should be included in the response.
65+
/// Defaults to true.
66+
/// </summary>
4767
public bool IncludeErrorDetails { get; set; } = true;
4868
public string? AuthenticationType { get; set; }
4969
public string? NameClaimType { get; set; }
50-
public string? RoleClaimType { get; set; }
70+
71+
/// <summary>
72+
/// The claim type that will be used to determine the user's roles.
73+
/// Defaults to "Role".
74+
/// </summary>
75+
public string RoleClaimType { get; set; } = "Role";
5176

5277
public class CertificateOptions
5378
{

src/Genocs.Auth/Extensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ private static IGenocsBuilder AddJwt(
7070
SaveSigninToken = options.SaveSigninToken,
7171
RequireExpirationTime = options.RequireExpirationTime,
7272
RequireSignedTokens = options.RequireSignedTokens,
73+
RoleClaimType = options.RoleClaimType,
7374
ClockSkew = TimeSpan.Zero
7475
};
7576

@@ -117,6 +118,7 @@ private static IGenocsBuilder AddJwt(
117118
}
118119
}
119120

121+
// If no certificate is provided, use symmetric encryption.
120122
if (!string.IsNullOrWhiteSpace(options.IssuerSigningKey) && !hasCertificate)
121123
{
122124
if (string.IsNullOrWhiteSpace(options.Algorithm) || hasCertificate)

src/Genocs.Auth/Genocs.Auth.csproj

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<Title>The authorization library useful to build .NET Core projects.</Title>
99
<Description>The authorization library useful to build .NET Core projects.</Description>
1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
11-
<Version>6.2.0</Version>
1211
<MinClientVersion>5.0.0</MinClientVersion>
1312
<Authors>Nocco Giovanni Emanuele</Authors>
1413
<PackageTags>microservice microservices solid solid-principles authentication genocs</PackageTags>
@@ -18,30 +17,15 @@
1817
<AnalysisLevel>latest</AnalysisLevel>
1918
</PropertyGroup>
2019

21-
<ItemGroup>
22-
<None Include="..\..\LICENSE">
23-
<Pack>True</Pack>
24-
<PackagePath>\</PackagePath>
25-
</None>
26-
<None Include="..\..\icon.png">
27-
<Pack>True</Pack>
28-
<PackagePath>\</PackagePath>
29-
</None>
30-
<None Include="README_NUGET.md">
31-
<Pack>True</Pack>
32-
<PackagePath>\</PackagePath>
33-
</None>
34-
</ItemGroup>
35-
3620
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
3721
<ProjectReference Include="..\Genocs.Core\Genocs.Core.csproj" />
3822
<ProjectReference Include="..\Genocs.Security\Genocs.Security.csproj" />
3923

4024
</ItemGroup>
4125

4226
<ItemGroup Condition="'$(Configuration)' == 'Release'">
43-
<PackageReference Include="Genocs.Core" Version="6.2.0" />
44-
<PackageReference Include="Genocs.Security" Version="6.2.0" />
27+
<PackageReference Include="Genocs.Core" Version="6.3.0" />
28+
<PackageReference Include="Genocs.Security" Version="6.3.0" />
4529
</ItemGroup>
4630

4731
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.1</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
55
<PackageId>Genocs.Common</PackageId>
66
<RootNamespace>Genocs.Common</RootNamespace>
77
<AssemblyName>Genocs.Common</AssemblyName>
88
<Title>The Genocs Library - Common components.</Title>
99
<Description>The common components to build .NET Core projects along with Genocs Library.</Description>
10-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
11-
<Version>6.2.0</Version>
10+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1211
<MinClientVersion>5.0.0</MinClientVersion>
1312
<Authors>Nocco Giovanni Emanuele</Authors>
1413
<PackageTags>microservice microservices solid solid-principles genocs</PackageTags>
@@ -18,19 +17,4 @@
1817
<AnalysisLevel>latest</AnalysisLevel>
1918
</PropertyGroup>
2019

21-
<ItemGroup>
22-
<None Include="..\..\LICENSE">
23-
<Pack>True</Pack>
24-
<PackagePath>\</PackagePath>
25-
</None>
26-
<None Include="..\..\icon.png">
27-
<Pack>True</Pack>
28-
<PackagePath>\</PackagePath>
29-
</None>
30-
<None Include="README_NUGET.md">
31-
<Pack>True</Pack>
32-
<PackagePath>\</PackagePath>
33-
</None>
34-
</ItemGroup>
35-
3620
</Project>

src/Genocs.Core.Demo.Contracts/Genocs.Core.Demo.Contracts.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</ItemGroup>
1212

1313
<ItemGroup Condition="'$(Configuration)' == 'Release'">
14-
<PackageReference Include="Genocs.Core" Version="6.2.0" />
14+
<PackageReference Include="Genocs.Core" Version="6.3.0" />
1515
</ItemGroup>
1616

1717
</Project>

src/Genocs.Core.Demo.Domain/Genocs.Core.Demo.Domain.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
</ItemGroup>
1313

1414
<ItemGroup Condition="'$(Configuration)' == 'Release'">
15-
<PackageReference Include="Genocs.Persistence.MongoDb" Version="6.2.0" />
16-
<PackageReference Include="Genocs.Core" Version="6.2.0" />
15+
<PackageReference Include="Genocs.Persistence.MongoDb" Version="6.3.0" />
16+
<PackageReference Include="Genocs.Core" Version="6.3.0" />
1717
</ItemGroup>
1818

1919
</Project>

src/Genocs.Core.Demo.WebApi/Genocs.Core.Demo.WebApi.csproj

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,37 @@
1111

1212
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
1313
<ProjectReference Include="..\Genocs.ServiceBusAzure\Genocs.ServiceBusAzure.csproj" />
14-
<ProjectReference Include="..\Genocs.Core\Genocs.Core.csproj" />
1514
<ProjectReference Include="..\Genocs.Auth\Genocs.Auth.csproj" />
1615
<ProjectReference Include="..\Genocs.Logging\Genocs.Logging.csproj" />
1716
<ProjectReference Include="..\Genocs.Tracing\Genocs.Tracing.csproj" />
1817
<ProjectReference Include="..\Genocs.HTTP\Genocs.HTTP.csproj" />
1918
<ProjectReference Include="..\Genocs.Security\Genocs.Security.csproj" />
19+
<ProjectReference Include="..\Genocs.WebApi\Genocs.WebApi.csproj" />
2020
<ProjectReference Include="..\Genocs.WebApi.Security\Genocs.WebApi.Security.csproj" />
21+
<ProjectReference Include="..\Genocs.Secrets.AzureKeyVault\Genocs.Secrets.AzureKeyVault.csproj" />
2122
</ItemGroup>
2223

2324
<ItemGroup Condition="'$(Configuration)' == 'Release'">
24-
<PackageReference Include="Genocs.ServiceBusAzure" Version="6.2.0" />
25-
<PackageReference Include="Genocs.Core" Version="6.2.0" />
26-
<PackageReference Include="Genocs.Auth" Version="6.2.0" />
27-
<PackageReference Include="Genocs.Logging" Version="6.2.0" />
28-
<PackageReference Include="Genocs.Tracing" Version="6.2.0" />
29-
<PackageReference Include="Genocs.HTTP" Version="6.2.0" />
30-
<PackageReference Include="Genocs.Security" Version="6.2.0" />
31-
<PackageReference Include="Genocs.WebApi.Security" Version="6.2.0" />
25+
<PackageReference Include="Genocs.ServiceBusAzure" Version="6.3.0" />
26+
<PackageReference Include="Genocs.Auth" Version="6.3.0" />
27+
<PackageReference Include="Genocs.Logging" Version="6.3.0" />
28+
<PackageReference Include="Genocs.Tracing" Version="6.3.0" />
29+
<PackageReference Include="Genocs.HTTP" Version="6.3.0" />
30+
<PackageReference Include="Genocs.Security" Version="6.3.0" />
31+
<PackageReference Include="Genocs.WebApi" Version="6.3.0" />
32+
<PackageReference Include="Genocs.WebApi.Security" Version="6.3.0" />
33+
<PackageReference Include="Genocs.Secrets.AzureKeyVault" Version="6.3.0" />
34+
3235
</ItemGroup>
3336

3437
<ItemGroup>
35-
<PackageReference Include="MassTransit.RabbitMQ" Version="8.2.5" />
38+
<PackageReference Include="MassTransit.RabbitMQ" Version="8.3.0" />
3639
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.8.1" />
3740
</ItemGroup>
3841

3942
<ItemGroup>
4043
<ProjectReference Include="..\Genocs.Core.Demo.Contracts\Genocs.Core.Demo.Contracts.csproj" />
4144
<ProjectReference Include="..\Genocs.Core.Demo.Domain\Genocs.Core.Demo.Domain.csproj" />
42-
<ProjectReference Include="..\Genocs.Secrets.AzureKeyVault\Genocs.Secrets.AzureKeyVault.csproj" />
43-
<ProjectReference Include="..\Genocs.WebApi\Genocs.WebApi.csproj" />
4445
</ItemGroup>
4546

4647
</Project>

0 commit comments

Comments
 (0)