Skip to content

ryuichi111/AspNetCoreJWTAuthSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

ASP.NET Core 2.2 / JWT Example

ASP.NET Core 2.2 WebAPI / JWT を使ったWebAPIのサンプル。

環境

  • Visual Studio 2019 Preview
  • ASP.NET Core 2.2
  • JWT 5.0.0-beta4

動作

  1. 以下で認証を行いAccessToken / RefreshTokenを取得します。
POST https://localhost:44341/api/token
{ "Email": "[email protected]",  "Password": "P@ssword" }

image

  1. 以下でトークンによる認証を行いAccessToken / RefreshTokenを取得します。
GET https://localhost:44341/api/vaGET 
Bearer Token : 1で取得したアクセストークン

image

  1. 以下でアクセストークン/リフレッシュトークンを更新します。
POST https://localhost:44341/api/token/rePOST 
{
 "accessToken": 1で取得したアクセストークン
 "refreshToken": 1で取得したリフレッシュトークン
    
}

image

About

ASP.NET Core 2.2 WebAPI / JWT を使ったサンプル

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages