File tree Expand file tree Collapse file tree 9 files changed +122
-23
lines changed
NetDevPack.Security.JwtExtensions.ApiAuthenticator
NetDevPack.Security.JwtExtensions.ApiClient
src/NetDevPack.Security.JwtExtensions
NetDevPack.Security.JwtExtensions.ApiTests
NetDevPack.Security.JwtExtensions.Tests Expand file tree Collapse file tree 9 files changed +122
-23
lines changed Original file line number Diff line number Diff line change 1+ name : Master - Publish packages
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+
7+ env :
8+ PACKAGE_MAJOR_VERSION : 5
9+ PACKAGE_MINOR_VERSION : 0
10+ CURRENT_REPO_URL : https://github.com/${{ github.repository }}
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ defaults :
16+ run :
17+ working-directory : src
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v2
22+
23+ - name : Setup .NET 5
24+ uses : actions/setup-dotnet@v1
25+ with :
26+ dotnet-version : 5.0.x
27+
28+ - name : Setup .NET Core 3.1
29+ uses : actions/setup-dotnet@v1
30+ with :
31+ dotnet-version : 3.1.x
32+
33+ - name : Generate version
34+ run : echo "PACKAGE_VERSION=$PACKAGE_MAJOR_VERSION.$PACKAGE_MINOR_VERSION.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
35+
36+ - name : Generate Package
37+ run : dotnet pack -c Release -o out -p:PackageVersion=${{env.PACKAGE_VERSION}} -p:RepositoryUrl=${{env.CURRENT_REPO_URL}}
38+
39+ - name : Publish the package to nuget.org
40+ run : dotnet nuget push ./out/*.nupkg --skip-duplicate --no-symbols true -k ${{ secrets.NUGET_AUTH_TOKEN}} -s https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change 1+ name : Pull Request Analisys
2+
3+ on :
4+ pull_request :
5+ branches : [ master ]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ defaults :
11+ run :
12+ working-directory : ./src
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v2
17+
18+ - name : Setup .NET 5
19+ uses : actions/setup-dotnet@v1
20+ with :
21+ dotnet-version : 5.0.x
22+
23+ - name : Setup .NET Core 3.1
24+ uses : actions/setup-dotnet@v1
25+ with :
26+ dotnet-version : 3.1.x
27+
28+ - name : Restore dependencies
29+ run : dotnet restore
30+
31+ - name : Build
32+ run : dotnet build --no-restore
33+
34+ - name : Test
35+ run : dotnet test --no-build
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.1</ TargetFramework >
4+ <TargetFrameworks >netcoreapp3.1;net5.0</ TargetFrameworks >
55 </PropertyGroup >
66
7+
78 <ItemGroup >
8- <PackageReference Include =" Bogus" Version =" 29 .0.2" />
9- <PackageReference Include =" Jwks.Manager. AspNetCore" Version =" 4 .0.4 " />
10- <PackageReference Include =" Jwks.Manager. Store.FileSystem" Version =" 4 .0.4 " />
11- <PackageReference Include =" System.IdentityModel.Tokens.Jwt" Version =" 6.7.1 " />
9+ <PackageReference Include =" Bogus" Version =" 33 .0.2" />
10+ <PackageReference Include =" NetDevPack.Security.JwtSigningCredentials. AspNetCore" Version =" 5 .0.6 " />
11+ <PackageReference Include =" NetDevPack.Security.JwtSigningCredentials. Store.FileSystem" Version =" 5 .0.6 " />
12+ <PackageReference Include =" System.IdentityModel.Tokens.Jwt" Version =" 6.11.0 " />
1213 </ItemGroup >
1314
1415
Original file line number Diff line number Diff line change 11using Bogus ;
2- using Jwks . Manager . Interfaces ;
32using Microsoft . AspNetCore . Http ;
43using Microsoft . Extensions . Configuration ;
54using Microsoft . IdentityModel . Tokens ;
5+ using NetDevPack . Security . JwtSigningCredentials . Interfaces ;
66using System ;
77using System . IdentityModel . Tokens . Jwt ;
88using System . Security . Claims ;
Original file line number Diff line number Diff line change 1- using Jwks . Manager . AspNetCore ;
21using Microsoft . AspNetCore . Builder ;
32using Microsoft . AspNetCore . Hosting ;
43using Microsoft . Extensions . Configuration ;
54using Microsoft . Extensions . DependencyInjection ;
65using Microsoft . Extensions . Hosting ;
6+ using NetDevPack . Security . JwtSigningCredentials . AspNetCore ;
77using System . IO ;
88
99namespace ApiAuthenticator
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.1</ TargetFramework >
4+ <TargetFrameworks >netcoreapp3.1;net5.0</ TargetFrameworks >
55 </PropertyGroup >
66
7- <ItemGroup >
8- <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 2.1.0" />
9- </ItemGroup >
107
118 <ItemGroup >
129 <ProjectReference Include =" ..\..\src\NetDevPack.Security.JwtExtensions\NetDevPack.Security.JwtExtensions.csproj" />
1310 </ItemGroup >
1411
12+ <ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
13+ <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 2.1.0" />
14+ </ItemGroup >
15+ <ItemGroup Condition =" '$(TargetFramework)' == 'netcoreapp3.1'" >
16+ <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 3.1.15" />
17+ </ItemGroup >
18+ <ItemGroup Condition =" '$(TargetFramework)' == 'net5.0'" >
19+ <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 5.0.6" />
20+ </ItemGroup >
1521
1622</Project >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >netstandard2.0</ TargetFramework >
4+ <TargetFrameworks >netstandard2.0;netcoreapp3.1;net5.0</ TargetFrameworks >
55 <Version >3.1.0</Version >
66 <Authors >Bruno Brito</Authors >
77 <PackageIconUrl >https://raw.githubusercontent.com/NetDevPack/NetDevPack/master/assets/IconNuget.png</PackageIconUrl >
1515 </PropertyGroup >
1616
1717 <ItemGroup >
18- <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 2.1.0" />
19- <PackageReference Include =" Microsoft.IdentityModel.Tokens" Version =" 6.7.1" />
20- <PackageReference Include =" System.Text.Json" Version =" 4.7.2" />
18+ <PackageReference Include =" Microsoft.IdentityModel.Tokens" Version =" 6.11.0" />
19+ <PackageReference Include =" System.Text.Json" Version =" 5.0.2" />
2120 </ItemGroup >
2221
22+ <ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
23+ <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 2.1.0" />
24+ </ItemGroup >
25+ <ItemGroup Condition =" '$(TargetFramework)' == 'netcoreapp3.1'" >
26+ <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 3.1.15" />
27+ </ItemGroup >
28+ <ItemGroup Condition =" '$(TargetFramework)' == 'net5.0'" >
29+ <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 5.0.6" />
30+ </ItemGroup >
2331</Project >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.1</ TargetFramework >
4+ <TargetFrameworks >netcoreapp3.1;net5.0</ TargetFrameworks >
55 </PropertyGroup >
66
77
8- <ItemGroup >
9- <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 2.1.0" />
10- </ItemGroup >
11-
12-
138 <ItemGroup >
149 <ProjectReference Include =" ..\..\src\NetDevPack.Security.JwtExtensions\NetDevPack.Security.JwtExtensions.csproj" />
1510 </ItemGroup >
1611
12+ <ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
13+ <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 2.1.0" />
14+ </ItemGroup >
15+ <ItemGroup Condition =" '$(TargetFramework)' == 'netcoreapp3.1'" >
16+ <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 3.1.15" />
17+ </ItemGroup >
18+ <ItemGroup Condition =" '$(TargetFramework)' == 'net5.0'" >
19+ <PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 5.0.6" />
20+ </ItemGroup >
1721</Project >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.1</ TargetFramework >
4+ <TargetFrameworks >netcoreapp3.1;net5.0</ TargetFrameworks >
55
66 <IsPackable >false</IsPackable >
77 </PropertyGroup >
1111 <PackageReference Include =" FluentAssertions" Version =" 5.10.3" />
1212 <PackageReference Include =" Jwks.Manager.AspNetCore" Version =" 4.0.4" />
1313 <PackageReference Include =" Jwks.Manager.Store.FileSystem" Version =" 4.0.4" />
14- <PackageReference Include =" Microsoft.AspNetCore.Mvc.Testing" Version =" 3.1.6" />
1514 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.6.1" />
1615 <PackageReference Include =" xunit" Version =" 2.4.1" />
1716 <PackageReference Include =" xunit.runner.visualstudio" Version =" 2.4.2" >
3231 <ProjectReference Include =" ..\NetDevPack.Security.JwtExtensions.ApiTests\NetDevPack.Security.JwtExtensions.ApiTests.csproj" />
3332 </ItemGroup >
3433
34+ <ItemGroup Condition =" '$(TargetFramework)' == 'netcoreapp3.1'" >
35+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.Testing" Version =" 3.1.15" />
36+ </ItemGroup >
37+ <ItemGroup Condition =" '$(TargetFramework)' == 'net5.0'" >
38+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.Testing" Version =" 5.0.6" />
39+ </ItemGroup >
3540
3641</Project >
You can’t perform that action at this time.
0 commit comments