UserManagement.Core 1.2.2

dotnet add package UserManagement.Core --version 1.2.2                
NuGet\Install-Package UserManagement.Core -Version 1.2.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UserManagement.Core" Version="1.2.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UserManagement.Core --version 1.2.2                
#r "nuget: UserManagement.Core, 1.2.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install UserManagement.Core as a Cake Addin
#addin nuget:?package=UserManagement.Core&version=1.2.2

// Install UserManagement.Core as a Cake Tool
#tool nuget:?package=UserManagement.Core&version=1.2.2                

UserManagement

It allows to manage user access through roles and permissions in an Intranet applications. It uses easily and is easily reusable.

It is necessary to download the following Packages

  1. UserManagement.Core
  2. UserManagement.SqlServer
  3. UserManagement.Security

Currently it is only possible to use a DB SQL SERVER.

Installation

To use 'application user management is necessary to enter this section of code in the Owin Start Class.

GlobalConfiguration.Configuration
.UseSqlServerStorage("<SQL Connection>"
,new SqlServerStorageOptions());            

The ** SqlServerStorageOptions ** Class has the following properties:

  1. PrepareSchemaIfNecessary
    • Indicate if you need to create the schema (default true)
  2. TransactionTimeout
    • Time Out for SQL transactions
  3. CommandTimeout
    • Time Out for SQL commands
  4. SchemaName
    • Indicates the name of the Schema which create tables (default UserManagement UserManagement)

To view the Dashboard will also need to add one more row in the Start Owin file

app.UseUserManagerDashboard("Name App");

This call is also possible to add options through the class DashboardOptions

  • AppPath (Path of the reference Intranet application)
  • Authorization (Management of internal permissions to UserManagement)
  • DisplayStorageConnectionString (Viewing the connection string)
  • DashboardTitle (DashBoard title)
Usage Example
GlobalConfiguration.Configuration.UseSqlServerStorage("Server=name_server; Database=DBGeneric; user id=User234;password=User234", new SqlServerStorageOptions
{                
   CommandTimeout = TimeSpan.FromMinutes(5)
});            
app.UseUserManagerDashboard("/Admin");

Writing the above, it will be possible to view the DashBoard by typing the word Admin in the URL (ex: http://myproject.com/Admin)

Authorization Management

In the Security package we find two classes.

  1. UserManagementAuthorize
    • Attribute used to manage authorizations
  2. UserManagementFormAuthentication
    • Contains two functions SigIn and SigOut (for access management with Web form)
UserManagementAuthorize

It can be used on methods, property classes and manages access to the resource. Allows you to define Rules, Permissions and Users divided by ";"

Example
[UserManagementAuthorize(Roles ="R1;R2")]
public ActionResult About()
{
    ViewBag.Message = "Your application description page.";
    return View();
}

UserManagementFormAuthentication

If you use Form authentication we have two static methods available:

  1. SigIn(string userName, string password)
  2. SigOut()

These allow the user to login and logout.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on UserManagement.Core:

Package Downloads
UserManagement.SqlServer

SQL Server 2008+ (including Express), SQL Server LocalDB support for UserManagement

UserManagement.Security

Manage access to the application

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.2 648 10/6/2020
1.2.1 537 8/24/2020

use with UserManagement.SqlServer and UserManagement.Security