Microsoft.AspNetCore.Authentication.JwtBearer 9.0.0
About
Microsoft.AspNetCore.Authentication.JwtBearer is a middleware component designed for ASP.NET Core applications. It facilitates JSON Web Token (JWT) authentication, enabling secure authentication for APIs and web services. This package allows you to validate JWT tokens issued by an authentication server, ensuring secure access to your application's resources.
Key Features
- Seamless integration with ASP.NET Core applications.
- Supports JSON Web Token (JWT) authentication.
- Enables secure authentication for APIs and web services.
- Flexible configuration options for token validation parameters.
- Works with .NET Core 3.0 and newer, as well as .NET Standard 2.1.
How to Use
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Tokens;
using System.Text;
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{
options.TokenValidationParameters = new TokenValidationParameters
{
ValidateIssuer = true,
ValidateAudience = true,
ValidateLifetime = true,
ValidateIssuerSigningKey = true,
ValidIssuer = "your_issuer",
ValidAudience = "your_audience",
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("your_secret_key"))
};
});
// Other configurations...
}
For more detailed configuration options and advanced scenarios, please refer to the blog JWT Validation and Authorization in ASP.NET Core.
Main Types
The main types provided by this library are:
JwtBearerDefaults
: Contains default values for JWT Bearer authentication.JwtBearerEvents
: Events used to handle JWT Bearer authentication events.JwtBearerHandler
: Handles JWT Bearer authentication requests.wtBearerOptions
: Options for configuring JWT Bearer authentication.
Additional Documentation
Feedback & Contributing
Microsoft.AspNetCore.Authentication.JwtBearer is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Showing the top 20 packages that depend on Microsoft.AspNetCore.Authentication.JwtBearer.
Packages | Downloads |
---|---|
MT.PACKAGE.UTILITY
妙探科技nuget工具包
|
258 |
MT.PACKAGE.UTILITY
妙探科技nuget工具包
1、添加日期转财务报表报告期DateTime扩展方法
|
99 |
Volo.Abp.AspNetCore.Authentication.JwtBearer
Package Description
|
33 |
Volo.Abp.AspNetCore.Authentication.JwtBearer
Package Description
|
32 |
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
25 |
Volo.Abp.AspNetCore.Authentication.JwtBearer
Package Description
|
25 |
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
22 |
Volo.Abp.AspNetCore.Authentication.JwtBearer
Package Description
|
22 |
Volo.Abp.AspNetCore.Authentication.JwtBearer
Package Description
|
21 |
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
21 |
Volo.Abp.AspNetCore.Authentication.JwtBearer
Package Description
|
20 |
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
20 |
Microsoft.AspNetCore.All
Microsoft.AspNetCore.All
|
20 |
.NET 9.0
Version | Downloads | Last updated |
---|---|---|
9.0.0 | 5 | 11/13/2024 |
9.0.0-rc.2.24474.3 | 3 | 10/23/2024 |
9.0.0-rc.1.24452.1 | 9 | 09/11/2024 |
9.0.0-preview.7.24406.2 | 9 | 08/16/2024 |
9.0.0-preview.6.24328.4 | 8 | 07/13/2024 |
9.0.0-preview.5.24306.11 | 11 | 06/14/2024 |
9.0.0-preview.4.24267.6 | 12 | 05/26/2024 |
9.0.0-preview.3.24172.13 | 13 | 04/14/2024 |
9.0.0-preview.2.24128.4 | 11 | 03/12/2024 |
9.0.0-preview.1.24081.5 | 10 | 02/26/2024 |
8.0.11 | 4 | 11/13/2024 |
8.0.10 | 7 | 10/10/2024 |
8.0.8 | 10 | 08/16/2024 |
8.0.7 | 12 | 07/12/2024 |
8.0.6 | 11 | 06/03/2024 |
8.0.5 | 13 | 05/29/2024 |
8.0.4 | 15 | 04/10/2024 |
8.0.3 | 14 | 03/12/2024 |
8.0.2 | 308 | 02/20/2024 |
8.0.1 | 19 | 01/17/2024 |
8.0.0 | 734 | 11/24/2023 |
8.0.0-rc.2.23480.2 | 14 | 10/11/2023 |
8.0.0-rc.1.23421.29 | 11 | 09/27/2023 |
8.0.0-preview.7.23375.9 | 19 | 08/14/2023 |
8.0.0-preview.6.23329.11 | 16 | 08/18/2023 |
8.0.0-preview.5.23302.2 | 11 | 09/29/2023 |
8.0.0-preview.4.23260.4 | 22 | 06/09/2023 |
8.0.0-preview.3.23177.8 | 17 | 06/20/2023 |
8.0.0-preview.2.23153.2 | 19 | 06/09/2023 |
8.0.0-preview.1.23112.2 | 15 | 06/08/2023 |
7.0.20 | 11 | 06/03/2024 |
7.0.19 | 12 | 05/19/2024 |
7.0.18 | 11 | 04/10/2024 |
7.0.17 | 13 | 03/12/2024 |
7.0.16 | 13 | 02/27/2024 |
7.0.15 | 15 | 01/17/2024 |
7.0.14 | 14 | 02/15/2024 |
7.0.13 | 16 | 01/09/2024 |
7.0.12 | 13 | 12/18/2023 |
7.0.11 | 15 | 10/25/2023 |
7.0.10 | 17 | 08/16/2023 |
7.0.9 | 14 | 09/29/2023 |
7.0.8 | 16 | 09/29/2023 |
7.0.7 | 39 | 06/16/2023 |
7.0.5 | 14 | 04/26/2023 |
7.0.4 | 12 | 09/29/2023 |
7.0.3 | 18 | 02/28/2023 |
7.0.2 | 19 | 07/05/2023 |
7.0.1 | 14 | 09/30/2023 |
7.0.0 | 15 | 06/16/2023 |
7.0.0-rc.2.22476.2 | 14 | 06/07/2023 |
7.0.0-rc.1.22427.2 | 14 | 09/29/2023 |
7.0.0-preview.7.22376.6 | 14 | 07/06/2023 |
7.0.0-preview.6.22330.3 | 13 | 10/18/2023 |
7.0.0-preview.5.22303.8 | 14 | 09/30/2023 |
7.0.0-preview.4.22251.1 | 13 | 11/26/2023 |
7.0.0-preview.3.22178.4 | 17 | 10/14/2023 |
7.0.0-preview.2.22153.2 | 14 | 09/29/2023 |
7.0.0-preview.1.22109.13 | 18 | 10/10/2023 |
6.0.36 | 6 | 11/13/2024 |
6.0.35 | 5 | 10/23/2024 |
6.0.33 | 8 | 08/16/2024 |
6.0.32 | 10 | 07/13/2024 |
6.0.31 | 11 | 06/03/2024 |
6.0.30 | 13 | 05/20/2024 |
6.0.29 | 17 | 04/10/2024 |
6.0.28 | 14 | 03/12/2024 |
6.0.27 | 14 | 02/26/2024 |
6.0.26 | 11 | 03/12/2024 |
6.0.25 | 10 | 01/17/2024 |
6.0.24 | 16 | 03/11/2024 |
6.0.23 | 14 | 01/10/2024 |
6.0.22 | 16 | 09/29/2023 |
6.0.21 | 14 | 08/16/2023 |
6.0.20 | 14 | 01/10/2024 |
6.0.19 | 14 | 12/29/2023 |
6.0.18 | 15 | 06/16/2023 |
6.0.16 | 900 | 04/13/2023 |
6.0.15 | 16 | 06/19/2023 |
6.0.14 | 18 | 03/08/2023 |
6.0.13 | 16 | 10/05/2023 |
6.0.12 | 18 | 07/05/2023 |
6.0.11 | 12 | 06/07/2023 |
6.0.10 | 19 | 06/19/2023 |
6.0.9 | 15 | 10/11/2023 |
6.0.8 | 12 | 12/12/2023 |
6.0.7 | 13 | 10/01/2023 |
6.0.6 | 282 | 06/22/2022 |
6.0.5 | 16 | 08/16/2023 |
6.0.4 | 20 | 08/14/2023 |
6.0.3 | 17 | 06/08/2023 |
6.0.2 | 22 | 10/10/2023 |
6.0.1 | 13 | 09/30/2023 |
6.0.0 | 1,629 | 11/18/2021 |
6.0.0-rc.2.21480.10 | 11 | 09/28/2023 |
6.0.0-rc.1.21452.15 | 15 | 06/09/2023 |
6.0.0-preview.7.21378.6 | 19 | 06/07/2023 |
6.0.0-preview.6.21355.2 | 15 | 06/20/2023 |
6.0.0-preview.5.21301.17 | 14 | 10/18/2023 |
6.0.0-preview.4.21253.5 | 19 | 06/19/2023 |
6.0.0-preview.3.21201.13 | 16 | 08/20/2023 |
6.0.0-preview.2.21154.6 | 13 | 08/18/2023 |
6.0.0-preview.1.21103.6 | 18 | 09/30/2023 |
5.0.17 | 14 | 07/04/2023 |
5.0.16 | 17 | 07/22/2023 |
5.0.15 | 14 | 06/09/2023 |
5.0.14 | 16 | 07/26/2023 |
5.0.13 | 14 | 10/08/2023 |
5.0.12 | 11 | 10/01/2023 |
5.0.11 | 18 | 09/29/2023 |
5.0.10 | 15 | 10/05/2023 |
5.0.9 | 16 | 09/29/2023 |
5.0.8 | 17 | 10/02/2023 |
5.0.7 | 12 | 12/11/2023 |
5.0.6 | 14 | 12/26/2023 |
5.0.5 | 13 | 12/10/2023 |
5.0.4 | 16 | 10/05/2023 |
5.0.3 | 18 | 10/12/2023 |
5.0.2 | 14 | 12/03/2021 |
5.0.1 | 15 | 09/30/2023 |
5.0.0 | 755 | 12/16/2020 |
5.0.0-rc.2.20475.17 | 9 | 09/30/2023 |
5.0.0-rc.1.20451.17 | 14 | 10/02/2023 |
5.0.0-preview.8.20414.8 | 12 | 10/06/2023 |
5.0.0-preview.7.20365.19 | 14 | 10/17/2023 |
5.0.0-preview.6.20312.15 | 11 | 10/02/2023 |
5.0.0-preview.5.20279.2 | 18 | 10/02/2023 |
5.0.0-preview.4.20257.10 | 14 | 12/02/2023 |
5.0.0-preview.3.20215.14 | 16 | 09/29/2023 |
5.0.0-preview.2.20167.3 | 13 | 10/02/2023 |
5.0.0-preview.1.20124.5 | 12 | 11/26/2023 |
3.1.32 | 12 | 09/29/2023 |
3.1.31 | 13 | 09/30/2023 |
3.1.30 | 13 | 10/04/2023 |
3.1.29 | 12 | 01/06/2024 |
3.1.28 | 14 | 09/29/2023 |
3.1.27 | 15 | 11/02/2023 |
3.1.26 | 12 | 01/09/2024 |
3.1.25 | 14 | 10/02/2023 |
3.1.24 | 12 | 10/12/2023 |
3.1.23 | 13 | 12/01/2023 |
3.1.22 | 15 | 09/29/2023 |
3.1.21 | 14 | 09/29/2023 |
3.1.20 | 11 | 11/04/2023 |
3.1.19 | 14 | 09/30/2023 |
3.1.18 | 14 | 10/03/2023 |
3.1.17 | 16 | 09/30/2023 |
3.1.16 | 8 | 02/24/2024 |
3.1.15 | 11 | 02/22/2024 |
3.1.14 | 16 | 10/02/2023 |
3.1.13 | 16 | 09/30/2023 |
3.1.12 | 12 | 10/08/2023 |
3.1.11 | 12 | 10/08/2023 |
3.1.10 | 16 | 09/29/2023 |
3.1.9 | 17 | 09/21/2023 |
3.1.8 | 17 | 09/29/2023 |
3.1.7 | 16 | 10/05/2023 |
3.1.6 | 13 | 09/29/2023 |
3.1.5 | 13 | 10/07/2023 |
3.1.4 | 10 | 10/02/2023 |
3.1.3 | 15 | 11/26/2023 |
3.1.2 | 18 | 10/09/2023 |
3.1.1 | 16 | 12/07/2023 |
3.1.0 | 17 | 09/30/2023 |
3.1.0-preview3.19555.2 | 13 | 10/05/2023 |
3.1.0-preview2.19528.8 | 12 | 11/26/2023 |
3.1.0-preview1.19508.20 | 15 | 10/08/2023 |
3.0.3 | 18 | 11/06/2023 |
3.0.2 | 16 | 09/26/2023 |
3.0.0 | 29 | 04/14/2021 |
3.0.0-rc1.19457.4 | 12 | 11/26/2023 |
3.0.0-preview9.19424.4 | 14 | 10/02/2023 |
3.0.0-preview8.19405.7 | 14 | 11/26/2023 |
3.0.0-preview7.19365.7 | 14 | 11/26/2023 |
3.0.0-preview6.19307.2 | 13 | 10/13/2023 |
3.0.0-preview5-19227-01 | 17 | 10/02/2023 |
3.0.0-preview4-19216-03 | 18 | 09/28/2023 |
3.0.0-preview3-19153-02 | 15 | 10/08/2023 |
3.0.0-preview-19075-0444 | 17 | 09/30/2023 |
2.2.0 | 14 | 10/27/2023 |
2.2.0-preview3-35497 | 16 | 10/03/2023 |
2.2.0-preview2-35157 | 16 | 09/29/2023 |
2.2.0-preview1-35029 | 15 | 09/29/2023 |
2.1.30 | 15 | 02/23/2024 |
2.1.2 | 15 | 09/29/2023 |
2.1.1 | 15 | 09/30/2023 |
2.1.0 | 18 | 09/02/2023 |
2.1.0-rc1-final | 18 | 09/29/2023 |
2.1.0-preview2-final | 17 | 09/30/2023 |
2.1.0-preview1-final | 19 | 10/22/2023 |
2.0.4 | 16 | 10/02/2023 |
2.0.3 | 17 | 11/06/2023 |
2.0.1 | 22 | 09/29/2023 |
2.0.0 | 15 | 09/29/2023 |
2.0.0-preview2-final | 20 | 10/22/2023 |
2.0.0-preview1-final | 14 | 09/28/2023 |
1.1.3 | 14 | 10/08/2023 |
1.1.2 | 14 | 10/05/2023 |
1.1.1 | 15 | 09/29/2023 |
1.1.0 | 20 | 10/01/2023 |
1.1.0-preview1-final | 15 | 10/22/2023 |
1.0.5 | 21 | 10/11/2023 |
1.0.4 | 16 | 09/30/2023 |
1.0.3 | 13 | 10/11/2023 |
1.0.2 | 18 | 09/30/2023 |
1.0.1 | 17 | 09/29/2023 |
1.0.0 | 19 | 10/02/2023 |
1.0.0-rc2-final | 20 | 10/22/2023 |