ProgrammerAL.Analyzers.RequiredAuthAnalyzer 0.1.0-preview.16

This is a prerelease version of ProgrammerAL.Analyzers.RequiredAuthAnalyzer.
dotnet add package ProgrammerAL.Analyzers.RequiredAuthAnalyzer --version 0.1.0-preview.16                
NuGet\Install-Package ProgrammerAL.Analyzers.RequiredAuthAnalyzer -Version 0.1.0-preview.16                
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="ProgrammerAL.Analyzers.RequiredAuthAnalyzer" Version="0.1.0-preview.16">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ProgrammerAL.Analyzers.RequiredAuthAnalyzer --version 0.1.0-preview.16                
#r "nuget: ProgrammerAL.Analyzers.RequiredAuthAnalyzer, 0.1.0-preview.16"                
#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 ProgrammerAL.Analyzers.RequiredAuthAnalyzer as a Cake Addin
#addin nuget:?package=ProgrammerAL.Analyzers.RequiredAuthAnalyzer&version=0.1.0-preview.16&prerelease

// Install ProgrammerAL.Analyzers.RequiredAuthAnalyzer as a Cake Tool
#tool nuget:?package=ProgrammerAL.Analyzers.RequiredAuthAnalyzer&version=0.1.0-preview.16&prerelease                

Required Auth Analyzer

The purpose of this repo is to create a NuGet package which hosts a C# Roslyn Analyzer to remind code authors to use an attribute to specify what authentication/authorization is needed for an individual endpoint.

Some Terms

AuthN = Authentication AuthZ = Authorization

Why not set it project wide and change it only when it's needed?

Because we're human and we forget. There are different ways you can manage what AuthN/AuthZ is used for ASP.NET Endpoints, but it generally comes down to "Set a base rule rule globally, and change it in the individual endpoints that should be different".

In small applications, that can work out well. But when you need to scale out to a team, now the entire team needs to remember the rules each time. It's conceptually easier as a developer to see the attribute on the endpoint and know what is required for an end user to use that endpoint.

Is it more work? Yeah, you type out 7 more charactrs. Stop being lazy and make your code easier to understand.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
0.1.0-preview.16 30 1/20/2025
0.1.0-preview.14 26 1/20/2025
0.1.0-preview.12 25 1/20/2025
0.1.0-preview.9 28 1/20/2025
0.1.0-preview.7 12 1/15/2025