AspNetCore.Identity.ByPermissions 1.1.16

System to abstract the job ob create permissions based on claims, for more info, check the example in https://github.com/JorTurFer/AspNetCore.Identity.ByPermissions

Install-Package AspNetCore.Identity.ByPermissions -Version 1.1.16
dotnet add package AspNetCore.Identity.ByPermissions --version 1.1.16
<PackageReference Include="AspNetCore.Identity.ByPermissions" Version="1.1.16" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AspNetCore.Identity.ByPermissions --version 1.1.16
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AspNetCore.Identity.ByPermissions, 1.1.16"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

AspNetCore.Identity.ByPermissions

Description

This system provides a abstraction layer of the claims system, registering the claims as attributes.The Identity framework manages the access checks and the system store the different permissions in a collection in order to access them in a manager page. This does easier the work of manage the access becouse once the manage zone is written, it's only necesary add attributes.

Information in build

Soon I am going to write the documentation, sorry (The next info is not complete)...

  1. Register the "Permissions Service"
public void ConfigureServices(IServiceCollection services)
{
  ....
  services.AddAuthorization(options =>
  {
      options.AddPermissions(new PermissionService());
  });
  ....
}
  1. Add the Permissions in the "Controllers" and "Actions"
//[AttributePermission("Permission Name","Description")]
[Permission("Home",  "Can access to Home Controller")]
public class HomeController : Controller
{
  public IActionResult Index()
  {
    return View();
  }
  //This line add a Permissions named "About" with a description and assigned to the action
  [Permission("About",  "Can see about page")]
  public IActionResult About()
  {
    ViewData["Message"] = "Your application description page.";
    return View();
  }
}

AspNetCore.Identity.ByPermissions

Description

This system provides a abstraction layer of the claims system, registering the claims as attributes.The Identity framework manages the access checks and the system store the different permissions in a collection in order to access them in a manager page. This does easier the work of manage the access becouse once the manage zone is written, it's only necesary add attributes.

Information in build

Soon I am going to write the documentation, sorry (The next info is not complete)...

  1. Register the "Permissions Service"
public void ConfigureServices(IServiceCollection services)
{
  ....
  services.AddAuthorization(options =>
  {
      options.AddPermissions(new PermissionService());
  });
  ....
}
  1. Add the Permissions in the "Controllers" and "Actions"
//[AttributePermission("Permission Name","Description")]
[Permission("Home",  "Can access to Home Controller")]
public class HomeController : Controller
{
  public IActionResult Index()
  {
    return View();
  }
  //This line add a Permissions named "About" with a description and assigned to the action
  [Permission("About",  "Can see about page")]
  public IActionResult About()
  {
    ViewData["Message"] = "Your application description page.";
    return View();
  }
}

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.16 635 8/26/2018
1.1.2 471 8/9/2018
1.0.0 461 8/9/2018