An example of how you can issue JWT tokens with ASP.NET Core 1, authenticate a user with the tokens issued and restrict access to controller methods based on user claims using ASP.NET Core MVC's policy features in a Web API project.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
WebApiJwtAuthDemo chore: one-way upgrade to VS2017 solution structure Apr 15, 2017
.gitignore chore: Initial commit Jul 3, 2016
README.md chore: Updated README Jul 8, 2016
WebApiJwtAuthDemo.sln chore: one-way upgrade to VS2017 solution structure Apr 15, 2017

README.md

aspnet-core-webapi-jwt-auth-example

An example of how you can issue JWT tokens with ASP.NET Core 1, authenticate a user with the tokens issued and restrict access to controller methods based on user claims using ASP.NET Core MVC's policy features in a Web API project.

Discussion

The code in this example is discussed as a series of blog posts.

Part I addresses how JSON Web Token can be configured and issued. Part II covers the authorisation aspects focusing on user claims using ASP.NET Core MVC’s policy features.