Skip to content
Jon P Smith edited this page Sep 8, 2021 · 28 revisions

Welcome to the AuthPermissions.AspNetCore (referred to as AuthP) library documentation.

If you are new to the AuthP then make sure to have had a look at the Readme file which gives an overview of what the library, and the Roadmap discussions for future plans and limitations.

The AuthP library is fairly complex and to help you the the documentation is broken up in to the following topics as shown in the sidebar.

  • Articles / Videos: which introduce different features in the AuthP library.
  • Concepts: which explains the various parts of the AuthP library.
  • Setup: which shows how to set up the AuthP in your application.
  • Usage: which explains how to use the AuthP features to enhance your application.
  • Admin: which covers the services used to manage Roles, AuthUsers, and Tenants.

Example code in this repo

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).

Example1.RazorPages.IndividualAccounts

This is a ASP.NET Core Razor Pages application using the Individual Accounts authentication provider with Cookie authentication. Look at this example for:

  • A very simple example of using AuthP's authorization Roles and AuthUsers
  • A comparison between ASP.NET Core authorization with AuthP's authorization
  • A standard admin of AuthP's Roles and Users.

Example2.WebApiWithToken.IndividualAccounts

This is a ASP.NET Core WebAPI application using the Individual Accounts authentication provider with JWT Token authentication. Look at this example for:

  • An example of using AuthP to create a JWT Token for you.
  • An example of using AuthP's JWT refresh feature.

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).

Example3 - not built yet

This example shows how AuthP would work with Azure Active Directory as the authentication provider.

Example4.MvcWebApp.IndividualAccounts

This is a ASP.NET Core MVC application using the Individual Accounts authentication provider with Cookie authentication. Look at this example for:

  • A more substantial application with lots of Permissions, Roles, Tenants and Users.
  • how to use AuthP to create a hierarchical multi-tenant system.
  • How the AuthP' admin code can be used to control Roles, Users and Tenants.

Articles / Videos

Concepts

Setup

Usage

Admin

SupportCode

Clone this wiki locally