Skip to content
This repository was archived by the owner on Aug 24, 2025. It is now read-only.

Commit 628055c

Browse files
committed
Upgrade to .NET 9x
1 parent 2c1ea7d commit 628055c

38 files changed

+331
-282
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"dotnet-ef": {
6-
"version": "8.0.8",
6+
"version": "9.0.0",
77
"commands": [
88
"dotnet-ef"
99
]

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@ roslynator_object_creation_type_style = implicit_when_type_is_obvious
1111
# The logging message template should not vary between calls to 'LoggerExtensions.LogError(ILogger, Exception?, string?, params object?[])'
1212
dotnet_diagnostic.CA2254.severity = suggestion
1313
dotnet_diagnostic.CA1852.severity = suggestion
14+
dotnet_diagnostic.CA1515.severity = suggestion
15+
16+
dotnet_diagnostic.IDE0005.severity = none
17+
dotnet_diagnostic.IDE0055.severity = none
18+
dotnet_diagnostic.IDE0160.severity = none
19+
dotnet_diagnostic.IDE0022.severity = none
20+
dotnet_diagnostic.IDE0021.severity = none
21+
dotnet_diagnostic.IDE0008.severity = none
22+
dotnet_diagnostic.IDE0061.severity = none
23+
dotnet_diagnostic.IDE0023.severity = none
24+
dotnet_diagnostic.IDE0051.severity = suggestion
25+
dotnet_diagnostic.IDE0052.severity = suggestion
26+
dotnet_diagnostic.IDE0058.severity = suggestion
27+
dotnet_diagnostic.IDE0046.severity = suggestion
28+
dotnet_diagnostic.IDE0048.severity = suggestion
29+
dotnet_diagnostic.IDE0010.severity = suggestion
30+
dotnet_diagnostic.IDE0045.severity = suggestion
31+
dotnet_diagnostic.IDE0130.severity = suggestion
32+
dotnet_diagnostic.IDE0072.severity = suggestion
33+
1434

1535
# SCS0008: The cookie is missing 'Secure' flag.
1636
dotnet_diagnostic.SCS0008.severity = suggestion

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: nuget
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
open-pull-requests-limit: 10
8+
groups:
9+
tests:
10+
patterns: ["*"]
11+
update-types: ["minor", "patch"]

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ jobs:
1212
- name: Setup .NET Core
1313
uses: actions/setup-dotnet@v3
1414
with:
15-
dotnet-version: 8.0.x
15+
dotnet-version: 9.0.x
1616
- name: Build ASPNETCore2JwtAuthentication
1717
run: dotnet build ./src/ASPNETCore2JwtAuthentication.WebApp/ASPNETCore2JwtAuthentication.WebApp.csproj --configuration Release

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
# Initializes the CodeQL tools for scanning.
4949
- name: Initialize CodeQL
50-
uses: github/codeql-action/init@v2
50+
uses: github/codeql-action/init@v3
5151
with:
5252
languages: ${{ matrix.language }}
5353
config-file: ./.github/workflows/codeql/codeql-config.yml
@@ -62,11 +62,11 @@ jobs:
6262
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
6363
# If this step fails, then you should remove it and run the build manually (see below)
6464
# - name: Autobuild
65-
# uses: github/codeql-action/autobuild@v2
65+
# uses: github/codeql-action/autobuild@v3
6666
- name: Setup .NET
6767
uses: actions/setup-dotnet@v3
6868
with:
69-
dotnet-version: 8.0.x
69+
dotnet-version: 9.0.x
7070
- name: Build
7171
run: dotnet build --configuration Release
7272

@@ -81,6 +81,6 @@ jobs:
8181
# ./location_of_script_within_repo/buildscript.sh
8282

8383
- name: Perform CodeQL Analysis
84-
uses: github/codeql-action/analyze@v2
84+
uses: github/codeql-action/analyze@v3
8585
with:
8686
category: "/language:${{matrix.language}}"

ASPNETCore2JwtAuthentication.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26124.0
3+
# Visual Studio 17
4+
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 15.0.26124.0
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EB31F3BE-2CB7-4C42-8E35-FF97075ECB4E}"
77
EndProject

Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
<Features>strict</Features>
2626
<ReportAnalyzer>true</ReportAnalyzer>
2727
</PropertyGroup>
28+
<PropertyGroup>
29+
<NuGetAudit>true</NuGetAudit>
30+
<NuGetAuditMode>all</NuGetAuditMode>
31+
<NuGetAuditLevel>low</NuGetAuditLevel>
32+
<WarningsNotAsErrors Condition="'$(Configuration)' != 'Release'">
33+
$(WarningsNotAsErrors);NU1900;NU1901;NU1902;NU1903;NU1904
34+
</WarningsNotAsErrors>
35+
</PropertyGroup>
2836
<ItemGroup>
2937
<Using Include="System.Globalization"/>
3038
<Using Include="System.Text.Json"/>

Directory.Packages.props

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
<Project>
22
<ItemGroup>
3-
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.163" />
4-
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20" />
3+
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.179" />
4+
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.12.19" />
55
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
66
<PackageVersion Include="AsyncFixer" Version="1.6.0" />
77
<PackageVersion Include="Asyncify" Version="0.9.7" />
88
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
99
<PackageVersion Include="SecurityCodeScan.VS2019" Version="5.6.7" />
10-
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.5" />
11-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Analyzers" Version="8.0.8" />
12-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8" />
13-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.8" />
10+
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.9" />
11+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Analyzers" Version="9.0.0" />
12+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0" />
13+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0" />
1414
<PackageVersion Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
1515
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
16-
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
17-
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.8" />
18-
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
19-
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
20-
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
21-
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
22-
<PackageVersion Include="fluentassertions" Version="6.12.1" />
23-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
16+
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
17+
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
18+
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
19+
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" />
20+
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
21+
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
22+
<PackageVersion Include="fluentassertions" Version="6.12.2" />
23+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
2424
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
25-
<PackageVersion Include="MSTest.TestAdapter" Version="3.6.0" />
26-
<PackageVersion Include="MSTest.TestFramework" Version="3.6.0" />
27-
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.8" />
28-
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.7.3" />
25+
<PackageVersion Include="MSTest.TestAdapter" Version="3.6.3" />
26+
<PackageVersion Include="MSTest.TestFramework" Version="3.6.3" />
27+
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.0" />
28+
<PackageVersion Include="Swashbuckle.AspNetCore" Version="7.0.0" />
2929
<PackageVersion Include="Microsoft.Web.LibraryManager.Build" Version="2.1.175" />
3030
<PackageVersion Include="UAParser" Version="3.1.47" />
3131
</ItemGroup>

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Jwt Authentication without ASP.NET Core Identity 8x
1+
Jwt Authentication without ASP.NET Core Identity 9x
22
===========
33

44
<p>
@@ -10,11 +10,11 @@ Jwt Authentication without ASP.NET Core Identity 8x
1010

1111
![jwtauth](/src/ASPNETCore2JwtAuthentication.WebApp/wwwroot/images/jwtauth.png)
1212

13-
A Jwt based authentication sample for ASP.NET Core 8x without using the Identity system. It includes:
13+
A Jwt based authentication sample for ASP.NET Core 9x without using the Identity system. It includes:
1414

1515
- Users and Roles tables with a many-to-may relationship.
1616
- A separated EF Core data layer with enabled migrations.
17-
- An EF Core 8x based service layer.
17+
- An EF Core 9x based service layer.
1818
- A Db initializer to seed the default database values.
1919
- An account controller with Jwt and DB based login, custom logout and refresh tokens capabilities.
2020
- 2 sample API controllers to show how user-roles can be applied and used.

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "8.0.400"
3+
"version": "9.0.100"
44
}
55
}

0 commit comments

Comments
 (0)