Adita.PlexNet.WinUI.Authorization 1.0.0

dotnet add package Adita.PlexNet.WinUI.Authorization --version 1.0.0                
NuGet\Install-Package Adita.PlexNet.WinUI.Authorization -Version 1.0.0                
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="Adita.PlexNet.WinUI.Authorization" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Adita.PlexNet.WinUI.Authorization --version 1.0.0                
#r "nuget: Adita.PlexNet.WinUI.Authorization, 1.0.0"                
#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 Adita.PlexNet.WinUI.Authorization as a Cake Addin
#addin nuget:?package=Adita.PlexNet.WinUI.Authorization&version=1.0.0

// Install Adita.PlexNet.WinUI.Authorization as a Cake Tool
#tool nuget:?package=Adita.PlexNet.WinUI.Authorization&version=1.0.0                

Adita.PlexNet.WinUI.Authorization

This library is designed to work with:

  • Adita.PlexNet.Core.Identity
  • Adita.PlexNet.Core.Identity.EntityFrameworkCore
  • Adita.PlexNet.Core.Security

You can learn about The PlexNet Identity here.

How to use

In the constructor of your App.xaml.cs class:

 //Set thread principal to anonymous before executing any codes
 Thread.CurrentPrincipal = new Adita.PlexNet.Core.Security.Principals.ApplicationPrincipal(new Adita.PlexNet.Core.Security.Claims.ApplicationIdentity());

Then you ready to use the behavior class in any UIElement, e.g.:

<Button>Click Me
    <i:Interaction.Behaviors>
        <authBehavior:AuthorizeBehavior Roles="Administrator;Maintainer"/>
    </i:Interaction.Behaviors>
</Button>
Product Compatible and additional computed target framework versions.
.NET net7.0-windows10.0.22621 is compatible.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 108 9/12/2024

First release