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

Commit 953cf68

Browse files
committed
Upgrade to .NET SDK 8.0.400
1 parent b485493 commit 953cf68

38 files changed

+586
-542
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": "7.0.3",
6+
"version": "8.0.8",
77
"commands": [
88
"dotnet-ef"
99
]

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dotnet_diagnostic.SCS0008.severity = suggestion
1717

1818
# SCS0009: The cookie is missing 'HttpOnly' flag.
1919
dotnet_diagnostic.SCS0009.severity = suggestion
20+
dotnet_diagnostic.S6968.severity = suggestion
2021

2122
# For improved performance, use the LoggerMessage delegates instead of calling 'LoggerExtensions.LogError(ILogger, Exception?, string?, params object?[])'
2223
dotnet_diagnostic.CA1848.severity = suggestion

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
99
liberapay: # Replace with a single Liberapay username
1010
issuehunt: # Replace with a single IssueHunt username
1111
otechie: # Replace with a single Otechie username
12-
custom: ['https://coffeebede.ir/%D9%88%D8%AD%D9%8A%D8%AF%D9%86%D8%B5%D9%8A%D8%B1%D9%8A', 'https://www.buymeacoffee.com/vahidn']
12+
custom: ['https://www.coffeete.ir/vnasiri', 'https://www.buymeacoffee.com/vahidn']

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v1
11+
- uses: actions/checkout@v4
1212
- name: Setup .NET Core
13-
uses: actions/setup-dotnet@v1
13+
uses: actions/setup-dotnet@v3
1414
with:
15-
dotnet-version: 7.0.202
15+
dotnet-version: 8.0.x
1616
- name: Build ASPNETCore2JwtAuthentication
1717
run: dotnet build ./src/ASPNETCore2JwtAuthentication.WebApp/ASPNETCore2JwtAuthentication.WebApp.csproj --configuration Release

.github/workflows/codeql.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "master" ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ "master" ]
20+
21+
jobs:
22+
analyze:
23+
name: Analyze
24+
# Runner size impacts CodeQL analysis time. To learn more, please see:
25+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
26+
# - https://gh.io/supported-runners-and-hardware-resources
27+
# - https://gh.io/using-larger-runners
28+
# Consider using larger runners for possible analysis time improvements.
29+
runs-on: windows-2019
30+
permissions:
31+
actions: read
32+
contents: read
33+
security-events: write
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
language: [ 'csharp' ]
39+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
40+
# Use only 'java' to analyze code written in Java, Kotlin or both
41+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
42+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
48+
# Initializes the CodeQL tools for scanning.
49+
- name: Initialize CodeQL
50+
uses: github/codeql-action/init@v2
51+
with:
52+
languages: ${{ matrix.language }}
53+
config-file: ./.github/workflows/codeql/codeql-config.yml
54+
# If you wish to specify custom queries, you can do so here or in a config file.
55+
# By default, queries listed here will override any specified in a config file.
56+
# Prefix the list here with "+" to use these queries and those in the config file.
57+
58+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
59+
# queries: security-extended,security-and-quality
60+
61+
62+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
63+
# If this step fails, then you should remove it and run the build manually (see below)
64+
# - name: Autobuild
65+
# uses: github/codeql-action/autobuild@v2
66+
- name: Setup .NET
67+
uses: actions/setup-dotnet@v3
68+
with:
69+
dotnet-version: 8.0.x
70+
- name: Build
71+
run: dotnet build --configuration Release
72+
73+
# ℹ️ Command-line programs to run using the OS shell.
74+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
75+
76+
# If the Autobuild fails above, remove it and uncomment the following three lines.
77+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
78+
79+
# - run: |
80+
# echo "Run, Build Application using script"
81+
# ./location_of_script_within_repo/buildscript.sh
82+
83+
- name: Perform CodeQL Analysis
84+
uses: github/codeql-action/analyze@v2
85+
with:
86+
category: "/language:${{matrix.language}}"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Security and Quality"
2+
3+
queries:
4+
- uses: security-and-quality
5+
6+
query-filters:
7+
- exclude:
8+
id: cs/useless-if-statement
9+
- exclude:
10+
id: cs/empty-block

.vscode/launch.json

Lines changed: 0 additions & 46 deletions
This file was deleted.

.vscode/tasks.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

Directory.Packages.props

Lines changed: 22 additions & 22 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.19" />
4-
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.5.22" />
3+
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.163" />
4+
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20" />
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" />
8-
<PackageVersion Include="SonarAnalyzer.CSharp" Version="8.53.0.62665" />
8+
<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.2.0" />
11-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Analyzers" Version="7.0.3" />
12-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.3" />
13-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.3" />
14-
<PackageVersion Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
15-
<PackageVersion Include="Newtonsoft.Json" Version="13.0.2" />
16-
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="7.0.3" />
17-
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.3" />
18-
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
19-
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
20-
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
21-
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.3" />
22-
<PackageVersion Include="fluentassertions" Version="6.10.0" />
23-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.3" />
24-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
25-
<PackageVersion Include="MSTest.TestAdapter" Version="3.0.2" />
26-
<PackageVersion Include="MSTest.TestFramework" Version="3.0.2" />
27-
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.3" />
28-
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
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" />
14+
<PackageVersion Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
15+
<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" />
24+
<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" />
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 7x
1+
Jwt Authentication without ASP.NET Core Identity 8x
22
===========
33

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

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

13-
A Jwt based authentication sample for ASP.NET Core 7x without using the Identity system. It includes:
13+
A Jwt based authentication sample for ASP.NET Core 8x 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 7x based service layer.
17+
- An EF Core 8x 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.

0 commit comments

Comments
 (0)