Skip to content

JSON Web Token (JWT) authentification for ASP Core Web API

Notifications You must be signed in to change notification settings

szykov/SimpleTokenService

Repository files navigation

Simple Token Service for ASP.NET Core

Synopsis

This is an example of implementation of JSON Web Token (JWT) authentification for ASP Core Web API. It is based on SimpleTokenProvider. Some of ideas were taken from openiddict-samples. It has the similar implementation as SimpleTokenProvider but as service with a controller. In that repo you may get ideas how to implement it in your own project.

Motivation

I wanted to create self made implementaion of JWT authentification as in SimpleTokenProvider but not using midleware.

Installation

  • Clone repo
  • Add user secrets:
{
  "TokenKey": "MySuperSecret_!123",
  "TokenIssuer": "issuer",
  "TokenAudience": "audience"
}

HEADER:

Content-Type: application/x-www-form-urlencoded

BODY:

username: YourUserName
password: YourPassword

About

JSON Web Token (JWT) authentification for ASP Core Web API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published