Giter VIP home page Giter VIP logo

rlavaud / authpermissions.aspnetcore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jonpsmith/authpermissions.aspnetcore

0.0 0.0 0.0 5.62 MB

This library provides extra authorization and multi-tenant features to an ASP.NET Core application.

Home Page: https://www.thereformedprogrammer.net/finally-a-library-that-improves-role-authorization-in-asp-net-core/

License: MIT License

JavaScript 0.17% C# 84.98% CSS 0.28% HTML 14.57%

authpermissions.aspnetcore's Introduction

AuthPermissions.AspNetCore

The AuthPermissions.AspNetCore library (shortened to AuthP) provides extra authorization features to a ASP.NET Core application. Here are AuthP's three main features:

  • An improved Role authorization system where the features a Role can access can be changed by an admin user (i.e. no need to edit and redeploy your application when a Role changes).
  • Provides features to create a multi-tenant database system, either using one-level tenant or multi-level tenant (hierarchical).
  • Implements a JWT refresh token feature to improve the security of using JWT Token in your application.

The AuthP is an open-source library under the MIT licence (and remain as a open-source library for ever) and the NuGet package can be found here. The documentation can be found in the GitHub wiki and the AuthP roadmap defines the different versions of this library.

List of versions and which .NET framework they support

  • Version 8.?.? supports NET 8 only (simpler to update to next NET release)
  • Version 6.?.? supports NET 6, 7 and 8
  • Version 5.?.? supports NET 6 and 7

If you have already built your application using an older version, then you need to look at the following "how up update" documents

  • From Migrating from AuthPermissions.AspNetCore 3, 4, 5 to 6.1 see UpdateToVersion620.md. NOTE: you only need to do this if you are using the "Sign up for a new tenant, with versioning" (shortened to "Sign up Tenant") feature AND your multi-tenant uses sharding.
  • From Migrating from AuthPermissions.AspNetCore 3, 4, 5 to 6.0 see UpdateToVersion6.md
  • From Migrating from AuthPermissions.AspNetCore 2, 3 or 4.* to 5.0 see UpdateToVersion5.md
  • From Migrating from AuthPermissions.AspNetCore 2.* to 3.0 see UpdateToVersion3.md
  • From Migrating from AuthPermissions.AspNetCore 1.* to 1.0 see UpdateToVersion2.md

The AuthP library also:

  • Works with any ASP.NET Core authentication provider. Currently has built-in individual accounts and Azure Active Directory versions, but you can create your own.
  • Works with either Cookie authentication or JWT Token authentication.
  • Contains an admin services to sync the authentication provider users with AuthP's users.
  • Has a comprehensive set of admin services to manage AuthP's Roles, Tenants and Users.

How to create an AuthPermissions.AspNetCore NuGet package

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.

See JonPSmith.MultiProjPack GitHub for why I created the JonPSmith.MultiProjPack and more about its features.

1. Install the MultiProjPack dotnet tool

On your computer you need to install the global tool using the command below (see this documentation to learn about global tools).

dotnet tool install JonPSmith.MultiProjPack --global

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.

2. Compile the AuthPermissions.AspNetCore in release Mode

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.

3. Run the MultiProjPack tool to create the

You run the MultiProjPack tool from a command line in the AuthPermissions.AspNetCore directory. I use Visual Studio's "Open in Terminal" using the command below ("R" is short for "Release")

MultiProjPack R

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.

The created .nupkg file will be found in the AuthPermissions.AspNetCore.nupkg directory AND in the user's {USERPROFILE}\LocalNuGet directory.

authpermissions.aspnetcore's People

Contributors

jonpsmith avatar mohamed-azhar avatar emorell96 avatar idan-h avatar akema-trebla avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.