JWT Authorization in ASP.NET Core 2.1 Web API - C#

  Рет қаралды 42,891

Senad Meškin Coding

Senad Meškin Coding

Күн бұрын

Пікірлер: 127
@Dartstefan
@Dartstefan 4 жыл бұрын
hvala senade, ovo je tačno ono što sam tražio !
@senadmeskincoding
@senadmeskincoding 4 жыл бұрын
Nema problema, hvala tebi.
@МаратНизаев-ч2н
@МаратНизаев-ч2н 4 жыл бұрын
Thank you for understandable English! Very easy for Russian ear!
@ATTI0822
@ATTI0822 5 жыл бұрын
Can't be more simple. Thank you 🔝
@rudic.yuwono4401
@rudic.yuwono4401 5 жыл бұрын
Thank you very much!! I've been researching how to implement JWT Authorization to no avail. I always had a hard time understanding this on other tutorials online, but in this video I could grasp it all in one playthrough!! Success always for your channel!
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Thank you :)
@priyankabarde6503
@priyankabarde6503 4 жыл бұрын
same here
@pecasuy
@pecasuy 5 жыл бұрын
Thanks, this video is the best explanation I've seen, simple, clear, perfect, even for my language in Spanish. I congratulate you and thank you for sharing your knowledge.
@vontz9887
@vontz9887 4 жыл бұрын
Very clearly explained. Good job and thank you!
@Tolg
@Tolg 5 жыл бұрын
Fantastic, easy to understand demonstration and explanation. I was struggling a bit on how to approach doing this, and now it's crystal clear to me. THANK YOU!
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
:)
@CarlosRuiz-zz1ee
@CarlosRuiz-zz1ee 4 жыл бұрын
Best explanation ever! so simple
@priyankabarde6503
@priyankabarde6503 4 жыл бұрын
very simple way explained a complex term
@vbenavides
@vbenavides 5 жыл бұрын
What a great explanation, clear, concise, straight to the point, thank you very much.
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Thanks. :)
@adnanertorer4900
@adnanertorer4900 4 жыл бұрын
Very clean explanation. Thank you very much!
@jamesbest2221
@jamesbest2221 5 жыл бұрын
FAN-TAS-TIC Video! This is the best explanation I've seen! Keep those JWT authorization videos coming! :)
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Thanks man ;)
@sothecominternational8973
@sothecominternational8973 5 жыл бұрын
Excellent Introduction and explanation. So many other tutorials seem to overcomplicate it and generally trying to sell you their services. Thanks for this. Look forward to your video on Authorising with Policies etc Happy to click on your paypal link when you have one
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Thanks.
@mofidmoghimi581
@mofidmoghimi581 5 жыл бұрын
You can't imaging how many helpful for me this tutorial. Thanks for this video
@CodingSquid
@CodingSquid 5 жыл бұрын
Very nice, thank you. By the way, everything worked perfectly in .NET Core 2.2. No changes required.
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Nice to hear that.
@SridharSathya
@SridharSathya 6 жыл бұрын
Like your presentation. No fluff about authentication/authorization and straight to the point. Would appreciate if you'd do part-2 with entity framework and or third party (Google/Facebook/etc.) authentication.
@pecasuy
@pecasuy 5 жыл бұрын
I suggest you make a video about authentication with username and password complementing this video that is spectacular.
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
I will, thanks.
@AlexandreToledoPerez
@AlexandreToledoPerez 5 жыл бұрын
Direct to the point! Great video.
4 жыл бұрын
Very descriptive. Thank you
@defektruke
@defektruke 4 жыл бұрын
svaka cast
@siddharthrai4282
@siddharthrai4282 4 жыл бұрын
You are awesome ... Thanks for making such a informative vedio.
@michaelr.santos6541
@michaelr.santos6541 5 жыл бұрын
Bravo! Outstanding video! Thanks for the excellent tutorial!
@MuhammadAli-df4ed
@MuhammadAli-df4ed 5 жыл бұрын
Teach complex topic in simple way, thanks.
@garyfirzon
@garyfirzon 4 жыл бұрын
Awesome and clear!
@johnnguyen1655
@johnnguyen1655 5 жыл бұрын
Realy appreciate your hard work, very focus and straightforward. It helps alot especially for beginners. Thanks from Vietnam!
@richardassal7788
@richardassal7788 5 жыл бұрын
Great job with this video. I just recently came across it. Just a suggestion, it would have been nice to show the [Authorize] at the resolution of the API call. But your example gave me the clue of what I needed to google and find the right answers.
@huzefajtg3489
@huzefajtg3489 4 жыл бұрын
Thank You, very well explained. Also Thank you for the code as well
@KanarekLife
@KanarekLife 5 жыл бұрын
You're amazing! I couldn't understand other tutorials about it but you managed to explain it so well that know I understand. Thank you so much!
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
You are welcome my friend :)
@vandeljasonstrypper6734
@vandeljasonstrypper6734 5 жыл бұрын
where have you been all of my life :) THANKS YOU SO MUCH FOR THIS WELL EXPLAINED VIDEO
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Thanks.
@vandeljasonstrypper6734
@vandeljasonstrypper6734 5 жыл бұрын
@@senadmeskincoding btw I have problem understanding with the meaning of "claim" I happen to need it in SignalR core to identify users can you make video explain it ?
@giftfelix4848
@giftfelix4848 4 жыл бұрын
Amazing and impactful session. thanks.
@rogeriooliveira8872
@rogeriooliveira8872 5 жыл бұрын
Simple and very nice.
@defektruke
@defektruke 4 жыл бұрын
thanks! You should make more videos about this !!!!
@kolesplace
@kolesplace 5 жыл бұрын
Very nicely done. Thank you.
@crsoftware
@crsoftware 6 жыл бұрын
Good job, friend! I understand it even better than other tutorials in my language (Spanish), I could find out much better how JWT works thanks to your explanation.
@ramsys9906
@ramsys9906 5 жыл бұрын
Thanks a lot bro. very simple and easy to understand, i think my search ends here.
@karuppaiahmani3901
@karuppaiahmani3901 5 жыл бұрын
awesome man..
@Aegisman
@Aegisman 5 жыл бұрын
Amazing and simple, all tutorial should be like this, thanks for the effort
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Thanks :)
@muthuraj7686
@muthuraj7686 5 жыл бұрын
Excellent work!
@vamsi8669
@vamsi8669 5 жыл бұрын
Hi Many Thanks, This really helped me
@林辉-n2i
@林辉-n2i 5 жыл бұрын
真是帮了大忙,万分感谢!!!!!!!!!!!!
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
谢谢:)
@ievheniiierokhin1677
@ievheniiierokhin1677 4 жыл бұрын
very nice example
@Kakaranish
@Kakaranish 5 жыл бұрын
Very good tutorial. Thank you man!
@dioscarr
@dioscarr 5 жыл бұрын
Great video. Awesome explanation. very clear!
@vivek.tiwary
@vivek.tiwary 5 жыл бұрын
Awesome video, thank you very much.
@imikhan83
@imikhan83 5 жыл бұрын
You just saved my life... Thank you so much for the video 👍
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
You are welcome ;)
@tonyriddle7646
@tonyriddle7646 3 жыл бұрын
it was like console version of JWT ... thank you
@faustogomez7731
@faustogomez7731 4 жыл бұрын
a usefull video, thanks
@marvinportgas9209
@marvinportgas9209 5 жыл бұрын
Awesome demo, thanks bro.
@developpa1519
@developpa1519 5 жыл бұрын
This is what I was looking for. Thankyou.
@eddyecko94
@eddyecko94 6 жыл бұрын
Love it brother... I needed that, thank you.
@senadmeskincoding
@senadmeskincoding 6 жыл бұрын
You are welcome, thanks for visiting :)
@vazhadvalishvili6426
@vazhadvalishvili6426 4 жыл бұрын
Great video, thatk you !
@mhn147
@mhn147 5 жыл бұрын
Great video! i can't thank you enough, thanks
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Thanks ;)
@mearn_ctaftsman
@mearn_ctaftsman 5 жыл бұрын
This is fantastic.
@javierlansky3893
@javierlansky3893 4 жыл бұрын
Excellent video, Could you explain us how the session expiration time works, how to use the "lifetime expiration validation"? Thanks a lot
@smartjames003
@smartjames003 5 жыл бұрын
Amazing stuff :) thank you very much :)
@rguere
@rguere 4 жыл бұрын
Good video my friend!! danke!!
@nuguestom4223
@nuguestom4223 5 жыл бұрын
really clear and helpful video. Thanks
@TheCchharles
@TheCchharles 4 жыл бұрын
Good afternoon, I have a customer in Vue who consumes an api, and implemented the JWT authorization explained in the video. Should I send from my client in Vue the security key to the AuthController? Since watching the video any client that can find out the address of the controller, it can generate the token back to access to the api. Thank you very good video congratulations, I wait for your answer
@senadmeskincoding
@senadmeskincoding 4 жыл бұрын
Hi Carlos, This video was just a demo, in a real-life app you should protect your token generator with another form of authorization. It could be any type that suits you. The unprotected token generator doesn't have purpose.
@gustavokuze
@gustavokuze 6 жыл бұрын
It helped me a lot, thanks!
@강인한-m2j
@강인한-m2j 5 жыл бұрын
Great video! This tutorial is perfect for me. Thanks
@richardassal7788
@richardassal7788 5 жыл бұрын
I have another suggestion. Perhaps you can make another video using RSA encryption instead of HMAC. OR perhaps using JWE.
@SuneelKumar-un9fw
@SuneelKumar-un9fw 5 жыл бұрын
Thanks sMeskIn,this video really super for beginners and advance level.could please provide full course of ASP.core latest version
@angeldeathz112
@angeldeathz112 6 жыл бұрын
thx so much master, grettings from chile
@senadmeskincoding
@senadmeskincoding 6 жыл бұрын
You are welcome my friend.
@vivaleute5141
@vivaleute5141 5 жыл бұрын
Thank you. Tutorial really helps me)
@Netmonster01
@Netmonster01 6 жыл бұрын
Thanks for the tutorial. I have something that may help someone down the road. Order matters, I had the app.UseAuthentication(); after the app.UseMvc(); and kept getting a 401 when trying to do a get on an authorized url. It must be like in his example. app.UseAuthentication(); app.UseMvc();
@photoshopexperts
@photoshopexperts 5 жыл бұрын
Ohh my days thanks for this comment was driving me mad trying to work out why it wasn't working ha
@pratikgajjar6183
@pratikgajjar6183 6 жыл бұрын
Awesome video. Thanks a lot. 👃👃
@yehornedbalo2969
@yehornedbalo2969 4 жыл бұрын
Thanks!
@infohpreet
@infohpreet 5 жыл бұрын
Awesome👍
@ariefs1277
@ariefs1277 4 жыл бұрын
what browser extensions that you used ? to show the json,rawdata and headers ?
@dilaramavi
@dilaramavi 5 жыл бұрын
Thank You!!!
@KevinGarcia-cx4rd
@KevinGarcia-cx4rd 6 жыл бұрын
Thanks very useful
@prakashkumark2657
@prakashkumark2657 6 жыл бұрын
Thanks for the tutorial. I have one doubt. Here you hardcoded the claims of a particular user.In Live applications where there are many number of users, the claims and roles may vary for each.So how to perform that .Thanks in advance for your help.
@senadmeskincoding
@senadmeskincoding 6 жыл бұрын
Hi, that is different kind of functionality, i tried to solve one problem with this video I didn't wanted it to be to big video but in order to add roles defined for certain user you could authorize user via bearer then get his data from db and put roles applied to that user into token. I coukd create another video with mixed authentication.
@prakashkumark2657
@prakashkumark2657 6 жыл бұрын
@@senadmeskincoding Thank You. It would be really helpful if u make another video asap with mixed authentication and roles.
@niyazi42
@niyazi42 5 жыл бұрын
Thank you brother
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
You are welcome :)
@81NARY
@81NARY 5 жыл бұрын
Thanks man, helped me so much. Can you please do a video on how to authenticate users and persist JWTs with Identity?
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
I will, thanks for suggestion.
@HarshShah92
@HarshShah92 5 жыл бұрын
HI, thank you for video, it's awesome and help me a lot. but i am facing one problem. i've set expires: DateTime.Now.AddMinutes(1) but it still give access to controller even after expire time(which is one minute). can you help? Thanks
@HarshShah92
@HarshShah92 5 жыл бұрын
i got it, in options.tokenvalidationparameter, add this parameter, ClockSkew=TimeSpan.Zero, will work.
@priyankabarde6503
@priyankabarde6503 4 жыл бұрын
Could you please make some more video
@Vietnamcamping89
@Vietnamcamping89 Жыл бұрын
what about the problem when someone copy that string then encoding/decode on browser
@nssandhu4401
@nssandhu4401 5 жыл бұрын
Please have the font size increased in your next videos. It is straining to read it at this level.
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Thanks, I will.
@richardassal7788
@richardassal7788 5 жыл бұрын
Can you direct me to a video or a hyperlink that will show me how to reject (black list) a token and still use this methodology? Can the token be inspected at the API call? Let’s assume a token has been ill gotten. I would like the opportunity to stop the token in its tracks without having to bring down the server.
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
I have no link but I could create a video with all that in. Net core 3.0?
@tonyriddle7646
@tonyriddle7646 3 жыл бұрын
in jwt.io ... it shows invalid signature... explain plz??
@songssam
@songssam 6 жыл бұрын
how did you run the server? I use vs code but whenever I run it, the server side does not automatically re-compile. I use angular 6 + core 2.1
@senadmeskincoding
@senadmeskincoding 6 жыл бұрын
I used Visual Studio 2017,for vs code you need to type in your terminal "dotnet build" to re-build application if it's not rebuilding on request.
@senadmeskincoding
@senadmeskincoding 6 жыл бұрын
And also if server is not running you need to start it with command "dotnet run"
@pratikgajjar6183
@pratikgajjar6183 6 жыл бұрын
If you want automatic re-compile, you need to add hot module replacement in your configuration, it is already added in core 2.1. (not sure about previous version)
@ronl1205
@ronl1205 6 жыл бұрын
If you want to auto-recompile, run "dotnet watch run" instead.
@raydeleon7806
@raydeleon7806 5 жыл бұрын
nice tutorial, bro i am using CORS in my project and it doesnt work, only works when i comment the use of cors
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Thanks.
@raydeleon7806
@raydeleon7806 5 жыл бұрын
@@senadmeskincoding i already solved it just change the order of services in startup.cs, you have any tutorial for read the token?
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Read claims? Or actual token?
@rikihanks
@rikihanks 5 жыл бұрын
But how is this secure? You give tokens for free and then everyone can use them? I was expecting an username and password authentication before giving the token.
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
This is not a full project, this is just example how to geberate and how to authenticate. In real app there will be different approach for generating and assigning process. This is how to generate and auth with JWT nothing else.
@jarekwojtaszczyk7050
@jarekwojtaszczyk7050 5 жыл бұрын
Meybe show. How read the "Our_Custom_Claim"s value ? The value which i can't read is useless.
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
I understand you, but this video was just about authorization. Maybe I will make one about reading it, and it's just a method :)
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Hey, You can see that in the video I made just for this purpose kzbin.info/www/bejne/pJDaYWqMmq6alc0
@JamsheerIndian
@JamsheerIndian 4 жыл бұрын
using httpost here for getting the token ? ..is it right way ? anyone pls reply, (i am new)
@senadmeskincoding
@senadmeskincoding 4 жыл бұрын
This is not about right or wrong way, this is just demonstration how to use tokens, and how to implement them into your app. And certainly everyone should use https in production, but this is demo on local PC.
@Tajdev
@Tajdev 5 жыл бұрын
I don't know what to do.
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
You have problems with it?
@Tajdev
@Tajdev 5 жыл бұрын
@@senadmeskincoding Is it applicable to asp. Net 4.x. where's the source code.
@senadmeskincoding
@senadmeskincoding 5 жыл бұрын
Yes it is, but you need to configure it differently. I have no code for asp.net but this code can be forked from a link in description.
Implementing JWT Authentication in ASP.NET Core
23:51
Nick Chapsas
Рет қаралды 37 М.
Adding JWT Authentication & Authorization in ASP.NET Core
17:24
Nick Chapsas
Рет қаралды 223 М.
Elza love to eat chiken🍗⚡ #dog #pets
00:17
ElzaDog
Рет қаралды 24 МЛН
Каха и лужа  #непосредственнокаха
00:15
БУ, ИСПУГАЛСЯ?? #shorts
00:22
Паша Осадчий
Рет қаралды 1,3 МЛН
I tricked MrBeast into giving me his channel
00:58
Jesser
Рет қаралды 29 МЛН
How to read Claims from Jason Web Token in ASP.NET Core 2.1 Web API - C#
14:16
Senad Meškin Coding
Рет қаралды 12 М.
JWT token authentication in ASP.NET Core 2.1 with Visual Studio 2017
35:12
Best Practices for Building Async APIs with ASP.NET Core
1:29:43
Token based authentication (JWT) in asp.net core 2.0 WebAPI
40:55
OpenEducation
Рет қаралды 67 М.
Clean Architecture with ASP.NET Core 2.1 | Jason Taylor
49:20
SSW TV | Videos for developers, by developers
Рет қаралды 309 М.
Full stack web development with ASP.NET Core 3.0 and Blazor - BRK3017
59:10
Microsoft Developer
Рет қаралды 166 М.
Authentication made easy with ASP.NET Core Identity in .NET 8
10:39
Milan Jovanović
Рет қаралды 72 М.
Elza love to eat chiken🍗⚡ #dog #pets
00:17
ElzaDog
Рет қаралды 24 МЛН