- DOTNET STANDARD 2.0
- Web API
- .Net Core SDK 3.0
- VSCode (ideally), or VS2019
- Install-Package ttn.Web.JwtToken
run api project with hot-reload.
cd sample
dotnet watch run
controller
[Authorize(AuthenticationSchemes = "your_scheme_name")]
public class AccountController : Controller
{
// any action of this Controller is identity required
}
action
[Authorize(AuthenticationSchemes = Consts.AuthenticationScheme)]
[HttpPost]
public async Task<IActionResult> yourAction([FromForm] string refreshToken)
{
// ...
return Ok("I am sign in");
}