AuthEndpoints 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package AuthEndpoints --version 1.0.1
                    
NuGet\Install-Package AuthEndpoints -Version 1.0.1
                    
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="AuthEndpoints" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AuthEndpoints" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="AuthEndpoints" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AuthEndpoints --version 1.0.1
                    
#r "nuget: AuthEndpoints, 1.0.1"
                    
#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.
#:package AuthEndpoints@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AuthEndpoints&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=AuthEndpoints&version=1.0.1
                    
Install as a Cake Tool

AuthEndpoints

nuget issues downloads workflow license

A simple jwt authentication library for ASP.Net 6. AuthEndpoints library provides a set of Web API controllers to handle basic web & JWT authentication actions such as registration, login, refresh, and verify. It works with custom identity user model. AuthEndpoints is built with the aim of increasing developer productivity.

Installation

NuGet

Basic Usage

// in your Program.cs

var accessParameters = new TokenValidationParameters()
{
	...
};

var refreshParameters = new TokenValidationParameters()
{
	...
};

builder.Services.AddAuthEndpoints<string, IdentityUser>(new AuthEndpointsOptions()
{
	AccessSecret = "<accesstoken_secret_key>",
	RefreshSecret = "<refreshtoken_secret_key>",
	AccessExpirationMinutes = 15,
	RefreshExpirationMinutes = 6000,
	Audience = "https://localhost:8000",
	Issuer = "https://localhost:8000",
	AccessValidationParameters = accessParameters,
	RefreshValidationParameters = refreshParameters
}).AddJwtBearerAuthScheme(accessParameters);


// Create a controller and inherit the base controller

public class AuthenticationController : JwtController<string, IdentityUser>
{}

public class UserController : BaseEndpointsController<string, IdentityUser>
{}

Documentations

Documentation is available at tbd and in docs directory.

Contributing

Your contributions are always welcome! simply send a pull request! The up-for-grabs label is a great place to start.

The documentation is far from perfect so every bit of help is more than welcome.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
2.2.0 1,172 9/24/2022
2.1.1 1,034 9/9/2022
2.1.0 1,093 9/9/2022 2.1.0 is deprecated because it has critical bugs.
2.0.2 1,098 9/3/2022
2.0.1 1,002 8/31/2022
2.0.0 1,098 8/22/2022 2.0.0 is deprecated because it has critical bugs.
1.7.0 1,109 8/10/2022 1.7.0 is deprecated because it is no longer maintained.
1.6.0 1,087 8/8/2022 1.6.0 is deprecated because it is no longer maintained.
1.5.0 1,036 8/2/2022 1.5.0 is deprecated because it is no longer maintained.
1.4.9 1,109 7/30/2022 1.4.9 is deprecated because it is no longer maintained.
1.4.8 1,090 7/27/2022 1.4.8 is deprecated because it is no longer maintained.
1.4.7 1,191 7/17/2022 1.4.7 is deprecated because it is no longer maintained.
1.4.6 1,075 6/25/2022 1.4.6 is deprecated because it is no longer maintained.
1.4.5 1,091 6/20/2022 1.4.5 is deprecated because it is no longer maintained.
1.4.4 1,104 6/18/2022 1.4.4 is deprecated because it is no longer maintained.
1.4.3 1,057 6/16/2022 1.4.3 is deprecated because it is no longer maintained.
1.4.2 1,145 6/14/2022 1.4.2 is deprecated because it is no longer maintained.
1.4.1 1,121 6/11/2022 1.4.1 is deprecated because it is no longer maintained.
1.4.0 1,157 6/6/2022 1.4.0 is deprecated because it is no longer maintained.
1.3.0 1,089 6/2/2022 1.3.0 is deprecated because it is no longer maintained.
1.2.0 1,093 5/30/2022 1.2.0 is deprecated because it is no longer maintained.
1.1.0 1,101 5/26/2022 1.1.0 is deprecated because it is no longer maintained.
1.0.1 1,074 5/25/2022 1.0.1 is deprecated because it is no longer maintained.
1.0.0 1,109 5/24/2022 1.0.0 is deprecated because it is no longer maintained.

Patch authorization error