How to create .NET 6.0 web api jwt authentication, Enable Token Bearer authentication in Swagger

preview_player
Показать описание
In this part, we are creating/enablingToken Bearer authentication in Swagger UI and also demonstrate how to use the token to access the protected api endpoint in .NET 6 API

Рекомендации по теме
Комментарии
Автор

I have follwed you whole tutorial I am able to generate the jwt token but when I am authorizing the API I am getting this error
content-length: 0
date: Wed, 29 Nov 2023 16:39:33 GMT
server: Kestrel
www-authenticate: Bearer error="invalid_token"

Can you please give a solution here?

ompandey_music
Автор

Didn't work, information not complete

ThePoyito
Автор

How to make fields mandatory under Authorization in this swagger view

sabithathota