Skip to content

Commit 1797b62

Browse files
committed
Update vulnerable NuGets and lastest JonPSmith libs
1 parent c5d6801 commit 1797b62

File tree

9 files changed

+27
-60
lines changed

9 files changed

+27
-60
lines changed

AuthPermissions.BaseCode/AuthPermissions.BaseCode.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="EntityFrameworkCore.Exceptions.PostgreSQL" Version="6.0.3" />
11-
<PackageReference Include="EntityFrameworkCore.Exceptions.Sqlite" Version="6.0.3" />
10+
<PackageReference Include="EntityFrameworkCore.Exceptions.PostgreSQL" Version="8.1.2" />
11+
<PackageReference Include="EntityFrameworkCore.Exceptions.Sqlite" Version="8.1.2" />
1212
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.0.0.2" />
1313
<PackageReference Include="GenericServices.StatusGeneric" Version="1.2.0" />
1414
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.2" />

AuthPermissions.SupportCode/AuthPermissions.SupportCode.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="DistributedLock" Version="2.3.4" />
10+
<PackageReference Include="DistributedLock" Version="2.4.0" />
1111
<PackageReference Include="Microsoft.Graph" Version="4.54.0" />
1212
<PackageReference Include="Net.DistributedFileStoreCache" Version="2.0.0" />
1313
</ItemGroup>

Example3.InvoiceCode/Example3.InvoiceCode.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1313
</PackageReference>
1414
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
15-
<PackageReference Include="NetCore.AutoRegisterDi" Version="2.2.0" />
15+
<PackageReference Include="NetCore.AutoRegisterDi" Version="2.2.1" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

Example4.MvcWebApp.IndividualAccounts/Example4.MvcWebApp.IndividualAccounts.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="EfCore.GenericServices" Version="8.0.0" />
9+
<PackageReference Include="EfCore.GenericServices" Version="8.1.0" />
1010
<PackageReference Include="EfCore.GenericServices.AspNetCore" Version="4.1.1" />
1111
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.0" />
1212
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />

Example4.ShopCode/Example4.ShopCode.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="EfCore.GenericServices" Version="8.0.0" />
8+
<PackageReference Include="EfCore.GenericServices" Version="8.1.0" />
99
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.0.0.2" />
1010
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
1111
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.2" />
@@ -14,7 +14,7 @@
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1515
</PackageReference>
1616
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
17-
<PackageReference Include="NetCore.AutoRegisterDi" Version="2.2.0" />
17+
<PackageReference Include="NetCore.AutoRegisterDi" Version="2.2.1" />
1818
</ItemGroup>
1919

2020

Example5.MvcWebApp.AzureAdB2C/Example5.MvcWebApp.AzureAdB2C.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" NoWarn="NU1605" />
1212
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0" NoWarn="NU1605" />
1313
<PackageReference Include="Microsoft.Graph" Version="4.54.0" />
14-
<PackageReference Include="Microsoft.Identity.Client" Version="4.59.0" />
14+
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.0" />
1515
<PackageReference Include="Microsoft.Identity.Web" Version="2.17.1" />
1616
<PackageReference Include="Microsoft.Identity.Web.UI" Version="2.17.1" />
1717
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.0" />

Example6.SingleLevelSharding/Example6.SingleLevelSharding.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="EfCore.GenericServices" Version="8.0.0" />
10+
<PackageReference Include="EfCore.GenericServices" Version="8.1.0" />
1111
<PackageReference Include="EfCore.TestSupport" Version="8.0.1" />
1212
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.0.0.2" />
1313
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
@@ -17,7 +17,7 @@
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
</PackageReference>
1919
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
20-
<PackageReference Include="NetCore.AutoRegisterDi" Version="2.2.0" />
20+
<PackageReference Include="NetCore.AutoRegisterDi" Version="2.2.1" />
2121
</ItemGroup>
2222

2323
<ItemGroup>

Example7.SingleLevelShardingOnly/Example7.SingleLevelShardingOnly.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="EfCore.GenericServices" Version="8.0.0" />
10+
<PackageReference Include="EfCore.GenericServices" Version="8.1.0" />
1111
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.0.0.2" />
1212
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
1313
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.2" />
@@ -16,7 +16,7 @@
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>
1818
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
19-
<PackageReference Include="NetCore.AutoRegisterDi" Version="2.2.0" />
19+
<PackageReference Include="NetCore.AutoRegisterDi" Version="2.2.1" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

README.md

Lines changed: 14 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -24,63 +24,30 @@ The AuthP library also:
2424
- Has a comprehensive set of admin services to manage AuthP's Roles, Tenants and Users.
2525

2626

27-
## Example code in this repo
27+
## How to create an AuthPermissions.AspNetCore NuGet package
2828

29-
The AuthPermissions.AspNetCore repo contains the following example of using AuthP with ASP.NET Core applications listed below. All of them can be run and show a HOME page describes what the application does (apart from the WebAPI example, which shows the Swagger display).
29+
The AuthPermissions.AspNetCore library contains more than one project. For this reason you can't (currently) create a NuGet package using NuGet values in a .csproj file. For this reason I created a `JonPSmith.MultiProjPack` dotnet tool to create the NuGet package using the following command in a command line on the AuthPermissions.AspNetCore directory.
3030

31-
### Example1 - Roles and permissions
31+
_See [`JonPSmith.MultiProjPack` GitHub](https://github.com/JonPSmith/MultiProgPackTool) for why I created the `JonPSmith.MultiProjPack` and more about its features._
3232

33-
This is a ASP.NET Core Razor Pages application using the Individual Accounts authentication provider with Cookie authentication. Look at this example for:
33+
### 1. Install the MultiProjPack dotnet tool
3434

35-
- A very simple example of using AuthP's authorization Roles and AuthUsers
36-
- A comparision between ASP.NET Core authorization with AuthP's authorization
37-
- A basic admin of Auth Users.
35+
`dotnet tool install JonPSmith.MultiProjPack --global`
3836

39-
### Example2 - JWT Token in ASP.NET Core Web API
37+
NOTE: To update the MultiProjPack .NET tool you need to run the command `dotnet tool update JonPSmith.MultiProjPack --global`. Or to uninstall this tool you should use `dotnet tool uninstall JonPSmith.MultiProjPack –-global` command.
4038

41-
This is a ASP.NET Core WebAPI application using the Individual Accounts authentication provider with JWT Token authentication. Look at this example for:
39+
### 2. Compile the AuthPermissions.AspNetCore in release Mode
4240

43-
- An example of using AuthP to create a JWT Token for you.
44-
- An example of using AuthP's JWT refresh feature.
41+
You must select "Release" compile mode and then use the "Build > Rebuild Solution" to ensure a new release version of the AuthPermissions.AspNetCore is available.
4542

46-
See the video [Improving JWT Token Security](https://www.youtube.com/watch?v=DtfNUHgwKyU) for more about this feature works.
43+
### 3. Run the `MultiProjPack` tool to create the
4744

48-
_NOTE: When running this example and you want to login you must run one of the authentication login WebAPIs and then copy the just the JWT Token string in into Swagger's Authorize box. Also, the default lifetime of the JWT Token is 5 minutes, so you wll get logged out quickly (this is done to check the AuthP's JWT refresh feature)._
45+
You run the `MultiProjPack` tool from a command line in the `AuthPermissions.AspNetCore` directory. I use the "Open in Terminal" with the command below.
4946

50-
### Example3 - Single level multi-tenant application
51-
52-
This is a ASP.NET Core MVC application using the Individual Accounts authentication provider with Cookie authentication. Look at this example for:
53-
54-
- How to use AuthP to create a single-level multi-tenant system.
55-
- Demo of changing the look and feel of an app when a tenant logs in.
56-
57-
### Example4 - Hierarchical multi-tenant application
58-
59-
This is a ASP.NET Core MVC application using the Individual Accounts authentication provider with Cookie authentication. Look at this example for:
60-
61-
- how to use AuthP to create a hierarchical multi-tenant system.
62-
- A more substantial application with lots of Permissions, Roles, Tenants and Users.
63-
- How the AuthP' admin code can be used to control Roles, Users and Tenants.
64-
65-
### Example5 - Login via Azure AD
66-
67-
This is a ASP.NET Core MVC application using the Azure AD authentication provider with Cookie authentication. Look at this example for:
68-
69-
- How to use Azure AD authentication with the AuthP library.
70-
71-
72-
## Notes on creating a NuGet package
73-
74-
The AuthPermissions.AspNetCore library contains more than one project. For this reason you can't (currently) create a NuGet package using NuGet values in a .csproj file.
75-
76-
For this reason I use the `JonPSmith.MultiProjPack` dotnet tool to create the NuGet package using the following command in a command line on the AuthPermissions.AspNetCore directory.
77-
78-
```
79-
> MultiProjPack R
47+
```console
48+
MultiProjPack R
8049
```
8150

82-
_NOTE: If you don't want to use the `JonPSmith.MultiProjPack` dotnet tool you should find a `CreateNuGetRelease.nuspec` file which you can call with the following command
51+
*NOTE: If you want to create a new version of the NuGet package you must update the NuGet `version` and most likely the `releaseNotes` in the `MultiProjPack.xml` before you call the `MultiProjPack` tool.*
8352

84-
```
85-
> dotnet pack -p:NuspecFile=CreateNuGetRelease.nuspec -v q -o ./nupkg
86-
```
53+
The created .nupkg file will be found in the `AuthPermissions.AspNetCore.nupkg` directory AND in the user's `{USERPROFILE}\LocalNuGet` directory.

0 commit comments

Comments
 (0)