MasterNeverDown.TokenBlackList 1.1.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package MasterNeverDown.TokenBlackList --version 1.1.3                
NuGet\Install-Package MasterNeverDown.TokenBlackList -Version 1.1.3                
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="MasterNeverDown.TokenBlackList" Version="1.1.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MasterNeverDown.TokenBlackList --version 1.1.3                
#r "nuget: MasterNeverDown.TokenBlackList, 1.1.3"                
#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 MasterNeverDown.TokenBlackList as a Cake Addin
#addin nuget:?package=MasterNeverDown.TokenBlackList&version=1.1.3

// Install MasterNeverDown.TokenBlackList as a Cake Tool
#tool nuget:?package=MasterNeverDown.TokenBlackList&version=1.1.3                

MasterNeverDown.TokenBlackList

Features

  • LoginLimitMiddleware The LoginLimitMiddleware class is a middleware component in an ASP.NET Core application that limits login attempts and locks out users after a certain number of failed attempts.
  • TokenBlackListMiddleware The TokenBlackListMiddleware class is responsible for checking if a token is blacklisted and preventing access if it is. It also provides a method to blacklist tokens for a specified duration. This middleware is useful for implementing logout functionality by blacklisting tokens upon logout.

Getting Started

Prerequisites

  • .NET 6.0 SDK or later
  • Visual Studio or JetBrains Rider

Installation

  1. Clone the repository:
    git clone https://github.com/your-repo/MasterNeverDown.TokenBlackList.git
    
    
    

Build

  1. Navigate to the project directory:
cd MasterNeverDown.TokenBlackList
  1. Restore the dependencies:
dotnet restore

Running the Application

Build and run the application:

dotnet run

Open your browser and navigate to https://localhost:5001/swagger to access the Swagger UI.

Usage

dotnet add package MasterNeverDown.TokenBlackList --version 1.1.2
// dependency injection
builder.Services.AddTokenBlackList();
..
//return 403 if login failed more than 3 times
app.UseMiddleware<LoginLimitMiddleware>(); //path must match /account/login
// add token to blacklist if user logout
app.UseMiddleware<TokenBlackListMiddleware>(); //path must match /account/logout

License

This project is licensed under the MIT License.

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. 
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.