Microsoft.AspNetCore.Authentication.JwtBearer 11.0.0-rc.1.26425.128

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
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/1f49b6637a0c3a6af34b42332e06966e4d383d54
19
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/67e04394e98d5bfa6a5684d471a72fcbe30fd587
20
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/8ca3954ca335343ce6dd1d14d8d1c6c3369710b7
21
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/b908e913e3befcfe241f3294509e6d9570acc07b
20
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/fbe05294ac5c88be848b4d57d60cb2657874da9b
20
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/06b2bc111203f9b9ff0914a7715675a9a66bdac9
19
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/32e8c8cae5b1a4dd752d0a42a6f8a2813f75f173
20
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/3b519aa7d1a1b66e1d329d694f814e1d8228dc8c
19
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/417d650029c720dbd2138bcafbb78e2e4ff31bff
24
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/54e8b61777d42d2b10744d1987438ee5b8c0b24d
19
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/5a007deadbb2636caff4656333cafc818b6b2ef6
19
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/64ea4108e7dcf1ca575f8dd2028363b0b1ef6ebc
19
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/68bb6fb08f8f85bb3cf08953a0d2f4a254eaccff
20
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/898c164a1f537a8210a26eaf388bdc92531f6b09
19
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/cec88a329584349fda070f4c7346b10538210ace
21
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/d504a7b7dab277712646747e9f5cce0d9507245e
19
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/d827c653b787c07de908240b7746ce34d3e6271e
19
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/f0f9de5692adf1c0576de062f93c6ab7b176433f
21
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/fb4b5a21ebd67b31fff4ddf5c039181da504c932
19
Microsoft.AspNetCore.ApiAuthorization.IdentityServer
ASP.NET Core API Authorization package powered by Identity Server. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/fc93e595ceffbb1e3e85532bf454e92a6a80dd6b
19

Version Downloads Last updated
11.0.0-rc.1.26425.128 3 27.09.2026
11.0.0-preview.7.26381.103 2 22.08.2026
11.0.0-preview.6.26359.118 3 21.07.2026
11.0.0-preview.5.26302.115 8 12.06.2026
11.0.0-preview.4.26230.115 10 17.05.2026
11.0.0-preview.3.26207.106 8 27.04.2026
11.0.0-preview.2.26159.112 7 15.03.2026
11.0.0-preview.1.26104.118 7 12.02.2026
10.0.12 1 26.09.2026
10.0.11 6 22.08.2026
10.0.10 3 21.07.2026
10.0.9 7 11.06.2026
10.0.8 9 17.05.2026
10.0.7 9 27.04.2026
10.0.6 14 27.04.2026
10.0.5 11 14.03.2026
10.0.4 11 14.03.2026
10.0.3 7 12.02.2026
10.0.2 15 22.01.2026
10.0.1 13 18.12.2025
10.0.0 18 22.11.2025
10.0.0-rc.2.25502.107 12 18.12.2025
10.0.0-rc.1.25451.107 10 18.12.2025
10.0.0-preview.7.25380.108 12 22.08.2025
10.0.0-preview.6.25358.103 12 08.08.2025
10.0.0-preview.5.25277.114 13 12.06.2025
10.0.0-preview.4.25258.110 10 11.06.2025
10.0.0-preview.3.25172.1 13 11.06.2025
10.0.0-preview.2.25164.1 12 27.03.2025
10.0.0-preview.1.25120.3 12 13.03.2025
9.0.20 2 26.09.2026
9.0.19 5 22.08.2026
9.0.18 7 21.07.2026
9.0.17 8 11.06.2026
9.0.16 9 17.05.2026
9.0.15 11 27.04.2026
9.0.14 8 14.03.2026
9.0.13 9 12.02.2026
9.0.12 11 22.01.2026
9.0.11 12 24.11.2025
9.0.10 13 25.10.2025
9.0.9 14 16.09.2025
9.0.8 44 18.08.2025
9.0.7 15 30.07.2025
9.0.6 16 05.08.2025
9.0.5 15 10.06.2025
9.0.4 17 10.06.2025
9.0.3 20 12.03.2025
9.0.2 20 16.03.2025
9.0.1 18 20.03.2025
9.0.0 19 01.01.2025
9.0.0-rc.2.24474.3 17 10.01.2025
9.0.0-rc.1.24452.1 16 11.01.2025
9.0.0-preview.7.24406.2 16 02.01.2025
9.0.0-preview.6.24328.4 15 02.01.2025
9.0.0-preview.5.24306.11 16 04.01.2025
9.0.0-preview.4.24267.6 17 03.01.2025
9.0.0-preview.3.24172.13 16 03.01.2025
9.0.0-preview.2.24128.4 15 03.01.2025
9.0.0-preview.1.24081.5 16 02.01.2025
8.0.31 2 26.09.2026
8.0.30 3 22.08.2026
8.0.29 3 21.07.2026
8.0.28 7 11.06.2026
8.0.27 7 17.05.2026
8.0.26 13 27.04.2026
8.0.25 7 14.03.2026
8.0.24 15 12.02.2026
8.0.23 8 22.01.2026
8.0.22 12 24.11.2025
8.0.21 12 25.10.2025
8.0.20 13 16.09.2025
8.0.19 14 21.08.2025
8.0.18 12 05.08.2025
8.0.17 12 05.08.2025
8.0.16 17 10.06.2025
8.0.15 17 10.06.2025
8.0.14 18 12.03.2025
8.0.13 19 20.02.2025
8.0.12 20 20.02.2025
8.0.11 20 04.01.2025
8.0.10 19 02.01.2025
8.0.8 22 03.01.2025
8.0.7 24 04.01.2025
8.0.6 24 16.01.2025
8.0.5 24 03.01.2025
8.0.4 20 03.01.2025
8.0.3 25 06.11.2024
8.0.2 19 03.01.2025
8.0.1 21 16.01.2025
8.0.0 22 03.01.2025
8.0.0-rc.2.23480.2 15 03.01.2025
8.0.0-rc.1.23421.29 16 12.01.2025
8.0.0-preview.7.23375.9 17 12.01.2025
8.0.0-preview.6.23329.11 16 04.01.2025
8.0.0-preview.5.23302.2 19 04.01.2025
8.0.0-preview.4.23260.4 17 04.01.2025
8.0.0-preview.3.23177.8 16 03.01.2025
8.0.0-preview.2.23153.2 17 02.01.2025
8.0.0-preview.1.23112.2 16 03.01.2025
7.0.20 21 02.01.2025
7.0.19 21 02.01.2025
7.0.18 22 02.01.2025
7.0.17 26 04.01.2025
7.0.16 22 28.01.2025
7.0.15 21 04.01.2025
7.0.14 21 03.01.2025
7.0.13 22 02.01.2025
7.0.12 21 02.01.2025
7.0.11 22 03.01.2025
7.0.10 27 04.01.2025
7.0.9 20 16.01.2025
7.0.8 19 02.01.2025
7.0.7 20 02.01.2025
7.0.5 21 03.01.2025
7.0.4 19 02.01.2025
7.0.3 21 03.01.2025
7.0.2 25 04.01.2025
7.0.1 19 02.01.2025
7.0.0 21 03.01.2025
7.0.0-rc.2.22476.2 15 02.01.2025
7.0.0-rc.1.22427.2 15 03.01.2025
7.0.0-preview.7.22376.6 15 02.01.2025
7.0.0-preview.6.22330.3 18 03.01.2025
7.0.0-preview.5.22303.8 17 02.01.2025
7.0.0-preview.4.22251.1 17 03.01.2025
7.0.0-preview.3.22178.4 16 03.01.2025
7.0.0-preview.2.22153.2 17 02.01.2025
7.0.0-preview.1.22109.13 16 04.01.2025
6.0.36 23 03.01.2025
6.0.35 22 04.01.2025
6.0.33 19 04.01.2025
6.0.32 21 03.01.2025
6.0.31 19 03.01.2025
6.0.30 23 04.01.2025
6.0.29 21 02.01.2025
6.0.28 20 02.01.2025
6.0.27 22 02.01.2025
6.0.26 21 02.01.2025
6.0.25 20 03.01.2025
6.0.24 22 02.01.2025
6.0.23 20 28.01.2025
6.0.22 19 02.01.2025
6.0.21 21 03.01.2025
6.0.20 23 03.01.2025
6.0.19 21 02.01.2025
6.0.18 20 03.01.2025
6.0.16 20 28.01.2025
6.0.15 20 03.01.2025
6.0.14 18 03.01.2025
6.0.13 21 03.01.2025
6.0.12 23 02.01.2025
6.0.11 22 02.01.2025
6.0.10 21 02.01.2025
6.0.9 19 02.01.2025
6.0.8 20 02.01.2025
6.0.7 19 02.01.2025
6.0.6 21 02.01.2025
6.0.5 23 02.01.2025
6.0.4 18 02.01.2025
6.0.3 26 04.01.2025
6.0.2 21 02.01.2025
6.0.1 20 02.01.2025
6.0.0 26 03.01.2025
6.0.0-rc.2.21480.10 16 03.01.2025
6.0.0-rc.1.21452.15 15 12.01.2025
6.0.0-preview.7.21378.6 15 03.01.2025
6.0.0-preview.6.21355.2 16 04.01.2025
6.0.0-preview.5.21301.17 14 02.01.2025
6.0.0-preview.4.21253.5 16 03.01.2025
6.0.0-preview.3.21201.13 15 02.01.2025
6.0.0-preview.2.21154.6 16 02.01.2025
6.0.0-preview.1.21103.6 16 03.01.2025
5.0.17 20 27.01.2025
5.0.16 23 16.01.2025
5.0.15 21 04.01.2025
5.0.14 19 03.01.2025
5.0.13 24 03.01.2025
5.0.12 21 02.01.2025
5.0.11 20 02.01.2025
5.0.10 21 04.01.2025
5.0.9 21 04.01.2025
5.0.8 19 02.01.2025
5.0.7 21 04.01.2025
5.0.6 19 03.01.2025
5.0.5 21 02.01.2025
5.0.4 20 08.10.2024
5.0.3 20 04.01.2025
5.0.2 20 03.01.2025
5.0.1 20 03.01.2025
5.0.0 20 03.01.2025
5.0.0-rc.2.20475.17 16 03.01.2025
5.0.0-rc.1.20451.17 17 15.01.2025
5.0.0-preview.8.20414.8 14 03.01.2025
5.0.0-preview.7.20365.19 20 03.01.2025
5.0.0-preview.6.20312.15 16 03.01.2025
5.0.0-preview.5.20279.2 17 02.01.2025
5.0.0-preview.4.20257.10 14 04.01.2025
5.0.0-preview.3.20215.14 15 12.01.2025
5.0.0-preview.2.20167.3 14 03.01.2025
5.0.0-preview.1.20124.5 20 03.01.2025
3.1.32 19 03.01.2025
3.1.31 22 02.01.2025
3.1.30 24 02.01.2025
3.1.29 21 02.01.2025
3.1.28 23 02.01.2025
3.1.27 21 02.01.2025
3.1.26 25 03.01.2025
3.1.25 22 04.01.2025
3.1.24 23 04.01.2025
3.1.23 18 16.01.2025
3.1.22 21 03.01.2025
3.1.21 22 03.01.2025
3.1.20 23 03.01.2025
3.1.19 23 04.01.2025
3.1.18 26 15.01.2025
3.1.17 20 03.01.2025
3.1.16 23 04.01.2025
3.1.15 22 02.01.2025
3.1.14 20 03.01.2025
3.1.13 20 11.01.2025
3.1.12 20 03.01.2025
3.1.11 22 03.01.2025
3.1.10 21 02.01.2025
3.1.9 19 03.01.2025
3.1.8 21 28.01.2025
3.1.7 19 02.01.2025
3.1.6 19 12.01.2025
3.1.5 19 04.01.2025
3.1.4 20 04.01.2025
3.1.3 20 28.01.2025
3.1.2 21 02.01.2025
3.1.1 21 03.01.2025
3.1.0 21 04.01.2025
3.1.0-preview3.19555.2 15 12.01.2025
3.1.0-preview2.19528.8 14 03.01.2025
3.1.0-preview1.19508.20 15 04.01.2025
3.0.3 21 02.01.2025
3.0.2 19 04.01.2025
3.0.0 20 02.01.2025
3.0.0-rc1.19457.4 16 15.01.2025
3.0.0-preview9.19424.4 15 02.01.2025
3.0.0-preview8.19405.7 17 15.01.2025
3.0.0-preview7.19365.7 18 04.01.2025
3.0.0-preview6.19307.2 17 02.01.2025
3.0.0-preview5-19227-01 16 03.01.2025
3.0.0-preview4-19216-03 14 02.01.2025
3.0.0-preview3-19153-02 19 03.01.2025
3.0.0-preview-19075-0444 15 03.01.2025
2.3.13 1 26.09.2026
2.3.12 5 22.08.2026
2.3.11 7 11.06.2026
2.3.10 11 17.05.2026
2.3.9 13 22.01.2026
2.3.8 9 22.01.2026
2.3.0 19 27.03.2025
2.2.0 20 28.01.2025
2.2.0-preview3-35497 17 15.01.2025
2.2.0-preview2-35157 17 04.01.2025
2.2.0-preview1-35029 18 15.01.2025
2.1.30 22 16.01.2025
2.1.2 19 12.01.2025
2.1.1 22 16.01.2025
2.1.0 20 15.01.2025
2.1.0-rc1-final 17 15.01.2025
2.1.0-preview2-final 15 03.01.2025
2.1.0-preview1-final 20 15.01.2025
2.0.4 24 09.08.2024
2.0.3 20 15.01.2025
2.0.1 18 15.01.2025
2.0.0 17 11.01.2025
2.0.0-preview2-final 17 04.01.2025
2.0.0-preview1-final 18 04.01.2025
1.1.3 23 15.01.2025
1.1.2 20 12.01.2025
1.1.1 22 15.01.2025
1.1.0 23 14.01.2025
1.1.0-preview1-final 20 15.01.2025
1.0.5 19 03.01.2025
1.0.4 19 03.01.2025
1.0.3 21 04.01.2025
1.0.2 19 12.01.2025
1.0.1 22 28.01.2025
1.0.0 20 03.01.2025
1.0.0-rc2-final 17 02.01.2025