Microsoft.AspNetCore.Authentication.JwtBearer 10.0.15

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.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.
62
Microsoft.AspNetCore.All
Microsoft.AspNetCore.All
59
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.
57
Microsoft.AspNetCore.All
Microsoft.AspNetCore.All
53
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/860072f7781a10db10fa925ea5c86d91f1e6f2c4
53
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.
53
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.
52
Microsoft.AspNetCore.All
Microsoft.AspNetCore.All
52
Microsoft.AspNetCore.All
Microsoft.AspNetCore.All
51
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.
51
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/ae2eabad0e49302d0632a7dde917fdc68d960dc4
51
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/55738ff96b832439076e25584cfe0eb3bace9b01
50
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/c49ccc8727c620ce1cb8fb431bb3fe8f2e747236
50
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.
50

Version Downloads Last updated
11.0.0 10 11/11/2026
11.0.0-rc.3.26522.148 14 10/26/2026
11.0.0-rc.2.26504.105 14 10/13/2026
11.0.0-rc.1.26425.128 26 09/09/2026
11.0.0-preview.7.26381.103 27 08/13/2026
11.0.0-preview.6.26359.118 32 07/16/2026
11.0.0-preview.5.26302.115 35 06/10/2026
11.0.0-preview.4.26230.115 38 05/14/2026
11.0.0-preview.3.26207.106 50 04/18/2026
11.0.0-preview.2.26159.112 29 03/11/2026
11.0.0-preview.1.26104.118 46 02/12/2026
10.0.15 11 11/11/2026
10.0.14 17 10/26/2026
10.0.13 17 10/13/2026
10.0.12 22 09/10/2026
10.0.11 26 08/13/2026
10.0.10 29 07/16/2026
10.0.9 25 06/10/2026
10.0.8 65 05/14/2026
10.0.7 2,281 04/23/2026
10.0.6 37 04/18/2026
10.0.5 46 03/14/2026
10.0.4 50 03/11/2026
10.0.3 47 02/12/2026
10.0.2 40 01/15/2026
10.0.1 4 09/30/2026
10.0.0 49 12/16/2025
10.0.0-rc.2.25502.107 35 12/20/2025
10.0.0-rc.1.25451.107 39 12/16/2025
10.0.0-preview.7.25380.108 48 12/20/2025
10.0.0-preview.6.25358.103 29 12/11/2025
10.0.0-preview.5.25277.114 45 12/11/2025
10.0.0-preview.4.25258.110 17 10/13/2026
10.0.0-preview.3.25172.1 40 12/11/2025
10.0.0-preview.2.25164.1 51 12/11/2025
10.0.0-preview.1.25120.3 47 12/16/2025
9.0.23 8 11/11/2026
9.0.22 13 10/26/2026
9.0.21 17 10/13/2026
9.0.20 20 09/09/2026
9.0.19 24 08/13/2026
9.0.18 32 07/16/2026
9.0.17 27 06/10/2026
9.0.16 42 05/14/2026
9.0.15 29 04/18/2026
9.0.14 43 03/11/2026
9.0.13 52 02/12/2026
9.0.12 39 01/15/2026
9.0.11 4 10/06/2026
9.0.10 44 12/21/2025
9.0.9 34 12/24/2025
9.0.8 32 12/13/2025
9.0.7 44 12/16/2025
9.0.6 36 12/20/2025
9.0.5 63 12/19/2025
9.0.4 63 12/13/2025
9.0.3 59 12/14/2025
9.0.2 38 12/16/2025
9.0.1 55 12/16/2025
9.0.0 59 12/14/2025
9.0.0-rc.2.24474.3 36 12/12/2025
9.0.0-rc.1.24452.1 49 12/14/2025
9.0.0-preview.7.24406.2 53 12/14/2025
9.0.0-preview.6.24328.4 16 09/29/2026
9.0.0-preview.5.24306.11 48 12/13/2025
9.0.0-preview.4.24267.6 56 12/16/2025
9.0.0-preview.3.24172.13 50 12/13/2025
9.0.0-preview.2.24128.4 43 12/13/2025
9.0.0-preview.1.24081.5 56 12/14/2025
8.0.34 16 11/11/2026
8.0.33 13 10/26/2026
8.0.32 16 10/13/2026
8.0.31 27 09/09/2026
8.0.30 25 08/13/2026
8.0.29 29 07/16/2026
8.0.28 30 06/10/2026
8.0.27 41 05/14/2026
8.0.26 30 04/18/2026
8.0.25 40 03/10/2026
8.0.24 70 02/12/2026
8.0.23 38 01/15/2026
8.0.22 7 10/14/2026
8.0.21 37 12/21/2025
8.0.20 36 12/16/2025
8.0.19 48 12/14/2025
8.0.18 36 12/16/2025
8.0.17 34 12/14/2025
8.0.16 46 12/19/2025
8.0.15 54 12/20/2025
8.0.14 56 12/14/2025
8.0.13 67 12/16/2025
8.0.12 54 12/13/2025
8.0.11 47 12/14/2025
8.0.10 53 12/11/2025
8.0.8 33 12/13/2025
8.0.7 49 12/13/2025
8.0.6 59 12/13/2025
8.0.5 41 12/16/2025
8.0.4 38 12/15/2025
8.0.3 15 10/05/2026
8.0.2 56 12/14/2025
8.0.1 59 12/13/2025
8.0.0 52 12/16/2025
8.0.0-rc.2.23480.2 49 12/14/2025
8.0.0-rc.1.23421.29 54 12/15/2025
8.0.0-preview.7.23375.9 50 12/11/2025
8.0.0-preview.6.23329.11 52 12/16/2025
8.0.0-preview.5.23302.2 47 12/13/2025
8.0.0-preview.4.23260.4 44 12/14/2025
8.0.0-preview.3.23177.8 50 12/13/2025
8.0.0-preview.2.23153.2 42 12/14/2025
8.0.0-preview.1.23112.2 58 12/13/2025
7.0.20 65 12/13/2025
7.0.19 45 12/14/2025
7.0.18 44 12/14/2025
7.0.17 21 10/01/2026
7.0.16 48 12/16/2025
7.0.15 63 12/14/2025
7.0.14 60 12/12/2025
7.0.13 56 12/16/2025
7.0.12 62 12/16/2025
7.0.11 40 12/16/2025
7.0.10 47 12/14/2025
7.0.9 40 12/13/2025
7.0.8 33 12/14/2025
7.0.7 46 12/14/2025
7.0.5 41 12/13/2025
7.0.4 41 12/16/2025
7.0.3 51 12/13/2025
7.0.2 34 12/14/2025
7.0.1 40 12/14/2025
7.0.0 51 12/13/2025
7.0.0-rc.2.22476.2 38 12/21/2025
7.0.0-rc.1.22427.2 36 12/15/2025
7.0.0-preview.7.22376.6 45 12/14/2025
7.0.0-preview.6.22330.3 37 12/13/2025
7.0.0-preview.5.22303.8 32 12/14/2025
7.0.0-preview.4.22251.1 36 12/14/2025
7.0.0-preview.3.22178.4 38 12/13/2025
7.0.0-preview.2.22153.2 45 12/14/2025
7.0.0-preview.1.22109.13 38 12/16/2025
6.0.36 51 12/16/2025
6.0.35 14 10/09/2026
6.0.33 39 12/14/2025
6.0.32 35 12/15/2025
6.0.31 50 12/13/2025
6.0.30 36 12/14/2025
6.0.29 48 12/14/2025
6.0.28 31 12/14/2025
6.0.27 38 12/16/2025
6.0.26 53 12/13/2025
6.0.25 52 12/16/2025
6.0.24 61 12/13/2025
6.0.23 57 12/14/2025
6.0.22 40 12/14/2025
6.0.21 61 12/14/2025
6.0.20 40 12/16/2025
6.0.19 54 12/16/2025
6.0.18 59 12/16/2025
6.0.16 65 12/14/2025
6.0.15 39 12/14/2025
6.0.14 47 12/14/2025
6.0.13 38 12/14/2025
6.0.12 52 12/14/2025
6.0.11 53 12/14/2025
6.0.10 74 12/16/2025
6.0.9 55 12/16/2025
6.0.8 44 12/14/2025
6.0.7 52 12/14/2025
6.0.6 32 12/16/2025
6.0.5 39 12/14/2025
6.0.4 61 12/16/2025
6.0.3 41 12/14/2025
6.0.2 41 12/14/2025
6.0.1 51 12/14/2025
6.0.0 46 12/16/2025
6.0.0-rc.2.21480.10 31 12/15/2025
6.0.0-rc.1.21452.15 32 12/15/2025
6.0.0-preview.7.21378.6 40 12/13/2025
6.0.0-preview.6.21355.2 31 12/14/2025
6.0.0-preview.5.21301.17 41 12/13/2025
6.0.0-preview.4.21253.5 34 12/14/2025
6.0.0-preview.3.21201.13 39 12/16/2025
6.0.0-preview.2.21154.6 41 12/16/2025
6.0.0-preview.1.21103.6 35 12/13/2025
5.0.17 42 12/14/2025
5.0.16 56 12/14/2025
5.0.15 44 12/14/2025
5.0.14 32 12/14/2025
5.0.13 37 12/14/2025
5.0.12 40 12/14/2025
5.0.11 37 12/14/2025
5.0.10 37 12/16/2025
5.0.9 45 12/14/2025
5.0.8 41 12/16/2025
5.0.7 47 12/14/2025
5.0.6 45 12/16/2025
5.0.5 50 12/13/2025
5.0.4 41 12/13/2025
5.0.3 64 12/14/2025
5.0.2 37 12/21/2025
5.0.1 45 12/14/2025
5.0.0 46 12/13/2025
5.0.0-rc.2.20475.17 37 12/16/2025
5.0.0-rc.1.20451.17 32 12/13/2025
5.0.0-preview.8.20414.8 60 12/14/2025
5.0.0-preview.7.20365.19 41 12/14/2025
5.0.0-preview.6.20312.15 34 12/13/2025
5.0.0-preview.5.20279.2 36 12/16/2025
5.0.0-preview.4.20257.10 39 12/14/2025
5.0.0-preview.3.20215.14 37 12/16/2025
5.0.0-preview.2.20167.3 42 12/15/2025
5.0.0-preview.1.20124.5 48 12/15/2025
3.1.32 40 12/16/2025
3.1.31 39 12/14/2025
3.1.30 52 12/13/2025
3.1.29 40 12/16/2025
3.1.28 60 12/14/2025
3.1.27 37 12/16/2025
3.1.26 39 12/14/2025
3.1.25 47 12/16/2025
3.1.24 55 12/14/2025
3.1.23 44 12/16/2025
3.1.22 55 12/14/2025
3.1.21 43 12/14/2025
3.1.20 43 12/13/2025
3.1.19 54 12/13/2025
3.1.18 53 12/14/2025
3.1.17 31 12/16/2025
3.1.16 56 12/14/2025
3.1.15 43 12/14/2025
3.1.14 43 12/13/2025
3.1.13 55 12/14/2025
3.1.12 57 12/13/2025
3.1.11 41 12/14/2025
3.1.10 59 12/13/2025
3.1.9 55 12/14/2025
3.1.8 43 12/13/2025
3.1.7 58 12/14/2025
3.1.6 49 12/16/2025
3.1.5 54 12/15/2025
3.1.4 51 12/16/2025
3.1.3 61 12/14/2025
3.1.2 63 12/13/2025
3.1.1 41 12/14/2025
3.1.0 64 12/14/2025
3.1.0-preview3.19555.2 38 12/15/2025
3.1.0-preview2.19528.8 48 12/14/2025
3.1.0-preview1.19508.20 46 12/14/2025
3.0.3 33 12/13/2025
3.0.2 64 12/14/2025
3.0.0 56 12/16/2025
3.0.0-rc1.19457.4 43 12/14/2025
3.0.0-preview9.19424.4 50 12/13/2025
3.0.0-preview8.19405.7 39 12/13/2025
3.0.0-preview7.19365.7 29 12/16/2025
3.0.0-preview6.19307.2 53 12/16/2025
3.0.0-preview5-19227-01 28 12/16/2025
3.0.0-preview4-19216-03 49 12/16/2025
3.0.0-preview3-19153-02 28 12/14/2025
3.0.0-preview-19075-0444 49 12/16/2025
2.3.14 11 11/11/2026
2.3.13 20 09/10/2026
2.3.12 27 08/13/2026
2.3.11 25 06/10/2026
2.3.10 42 05/17/2026
2.3.9 56 01/08/2026
2.3.8 53 01/08/2026
2.3.0 47 12/16/2025
2.2.0 47 12/16/2025
2.2.0-preview3-35497 47 12/16/2025
2.2.0-preview2-35157 42 12/16/2025
2.2.0-preview1-35029 47 12/14/2025
2.1.30 51 12/15/2025
2.1.2 51 12/14/2025
2.1.1 44 12/20/2025
2.1.0 28 12/16/2025
2.1.0-rc1-final 30 12/21/2025
2.1.0-preview2-final 35 12/16/2025
2.1.0-preview1-final 35 12/16/2025
2.0.4 49 12/16/2025
2.0.3 67 12/16/2025
2.0.1 47 12/14/2025
2.0.0 53 01/01/2026
2.0.0-preview2-final 41 12/15/2025
2.0.0-preview1-final 47 12/16/2025
1.1.3 55 12/13/2025
1.1.2 43 12/16/2025
1.1.1 48 12/16/2025
1.1.0 58 12/16/2025
1.1.0-preview1-final 33 12/16/2025
1.0.5 52 12/13/2025
1.0.4 59 12/13/2025
1.0.3 50 12/13/2025
1.0.2 35 12/13/2025
1.0.1 54 12/14/2025
1.0.0 43 12/15/2025
1.0.0-rc2-final 39 12/16/2025