JwtAuthForWebAPI 2.0.6

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

// Install JwtAuthForWebAPI as a Cake Tool
#tool nuget:?package=JwtAuthForWebAPI&version=2.0.6                

Provides easy implementation for JWT-based HTTP authentication in an ASP.NET Web API project.

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on JwtAuthForWebAPI:

Repository Stars
jamiekurtz/WebApi2Book
Example source code that accompanies ASP.NET Web API 2: Building a REST Service from Start to Finish
Version Downloads Last updated
2.0.7 597 4/22/2015
2.0.6 81 4/21/2015
2.0.5 409 1/28/2015
2.0.4 519 9/17/2014
2.0.3-RC2 143 8/4/2014
2.0.2-beta1 95 5/21/2014
2.0.1-beta1 195 5/19/2014
2.0.0-beta1 83 5/19/2014
1.0.7 188 5/12/2014
1.0.6 94 5/11/2014
1.0.5 128 4/12/2014
1.0.4 101 1/23/2014
1.0.3 81 1/23/2014
1.0.2 94 11/12/2013
1.0.1 90 11/6/2013
1.0.0 93 11/6/2013

Nuget-deployed library for securing your ASP.NET Web API service with JSON Web Tokens (JWT).

     This library is essentially a DelegatingHandler that creates a new ClaimsPrincipal based on the incoming token and assigns it to the current thread. As such, you *must* secure your controllers and/or their actions with the `[Authorize]` attribute - per standard ASP.NET authorization practices. In other words, the handler doesn't actually prevent unauthorized access to your site - that's what the `[Authorize]` attribute is for.

     The required token can exist in either the HTTP Authorization header or a browser cookie (cookie's name provided during configuration of the JwtAuthenticationMessageHandler object).

     Configure your ASP.NET Web API site with this library by putting the following code (or similar) in your WebApiConfig.Register() method:

     var builder = new SecurityTokenBuilder();
     var jwtHandler = new JwtAuthenticationMessageHandler
     {
         AllowedAudience = "http://www.example.com/",
         Issuer = "corp",
         SigningToken = builder.CreateFromCertificate("CN=JwtAuthForWebAPI Example"),
         CookieNameToCheckForToken = "ut"
     };

     config.MessageHandlers.Add(jwtHandler);


     Version 2.0.5 added support for allowing callers to submit the required token in a browser cookie - to better support Single Page Applications with your REST API.
     
     Please see the project site for more details.