You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-47Lines changed: 14 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,63 +24,30 @@ The AuthP library also:
24
24
- Has a comprehensive set of admin services to manage AuthP's Roles, Tenants and Users.
25
25
26
26
27
-
## Example code in this repo
27
+
## How to create an AuthPermissions.AspNetCore NuGet package
28
28
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.
30
30
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._
32
32
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
34
34
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
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.
40
38
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
42
40
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.
45
42
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
47
44
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.
49
46
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.
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
80
49
```
81
50
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.*
0 commit comments