Skip to content

Sample project which uses JWT Authentication in ASP.NET Core

Notifications You must be signed in to change notification settings

stephanprobst/aspnetcore-jwt-sample

Repository files navigation

AspNetCore-JWT-Sample

Prerequisites:

  • Docker
  • Swarm

Setup

To build all container images:

docker-compose build

Deploy the stack:

docker stack deploy -c docker-compose.yml token

Usage

Call

POST http://localhost:5000/api/token
{
    "username" : "mickey",
    "password" : "mouse"
}

To get the token:

{
    "token": "<JWT-TOKEN>"
}

Add the token as Bearer Authorization header

Authorization: Bearer <JWT-TOKEN>

To get:

GET http://localhost:5001/api/cars/

Play around

About

Sample project which uses JWT Authentication in ASP.NET Core

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages