C
C#9mo ago
fright

❔ JWT + Microsoft.AspNetCore.Authentication.JwtBearer

I added to my small (Asp.net Webapi) project JSON Web Token from tutorial but I don't uderstand this conecpt. I want read about this concept but I have problem with reading this in docuemntation: https://learn.microsoft.com/en-us/aspnet/core/security/authentication/samples?view=aspnetcore-7.0 Is it just me, or does the documentation present this concept in a way that might be hard for a beginner to understand? Can you recomment articles or link to docuemtnation how implents JWT toekn + asp.net identity in profesional way?
Authentication samples for ASP.NET Core
Provides links to the authentication samples in the ASP.NET Core repository.
16 Replies
JakenVeina
JakenVeina9mo ago
what is the concept you're having trouble with?
fright
fright9mo ago
JSON Web Token
JakenVeina
JakenVeina9mo ago
what about them?
fright
fright9mo ago
Can you recomemnd articles / link to docuemtnation how implemnt this in proffesional way ?
JakenVeina
JakenVeina9mo ago
the one you linked would be the best unless you can actually elaborate what about JSON Web Tokens are you having trouble with?
fright
fright9mo ago
I did this from tutorial and I don't know if I did this in good way and I have problem with reading the docuemntation about it.
JakenVeina
JakenVeina9mo ago
did what?
fright
fright9mo ago
I implemented JWT from tutorial to my small project
JakenVeina
JakenVeina9mo ago
great let's see it $code
MODiX
MODiX9mo ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
JakenVeina
JakenVeina9mo ago
$details
MODiX
MODiX9mo ago
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
fright
fright9mo ago
BlazeBin - vzolrychjloq
A tool for sharing your source code with the world!
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
fright
fright9mo ago
Yes this Asp.net core thx for info
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class ShopsController : ControllerBase
{
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class ShopsController : ControllerBase
{
and yeah I have [Authorize] in all controllers
Accord
Accord9mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.