No video

Spring boot 3.0 - Secure your API with JWT Token [2023]

  Рет қаралды 148,337

Bouali Ali

Bouali Ali

Күн бұрын

Пікірлер: 774
@BoualiAli
@BoualiAli Жыл бұрын
Join the Micro Services course waiting list and get and get an exclusive *EARLY-BIRD discount* aliboucoding.ck.page/d0f9317e13
@kenkaneki669
@kenkaneki669 Жыл бұрын
You have no idea how much you have helped me. Due to other tutorials being backdated, I just couldn't find a proper step by step procedure on how to implement jwt in spring boot. You saved my university major project. I wish you lifetime of happiness and health.
@BoualiAli
@BoualiAli Жыл бұрын
Really happy you liked it
@aeroabrar_31
@aeroabrar_31 11 ай бұрын
@@BoualiAli A small error check : the token will get expired in only 24 minutes not 24 hours. Apart from that everything is crystal clear.
@juldasramde9057
@juldasramde9057 2 күн бұрын
The best course you'll find anywhere. Thank you Alibou !
@swipped99
@swipped99 3 ай бұрын
It is astonishing with what fast pace spring boot is moving forwards. Alot of the methods shown here are already deprecated and marked for removal.
@soukainaj
@soukainaj Ай бұрын
Thank you for this amazing tutorial, i had a hard time understanding the process behind spring security, but you explained it very well and didn't just focus on the code itself
@joypedze2320
@joypedze2320 Жыл бұрын
I just finished this tutorial and trust me, if you want to learn about Spring Security using JWT, this is the way. Thanks @Bouli Ali for such awesome content
@BoualiAli
@BoualiAli Жыл бұрын
I really appreciate your great and honest feedback. This keeps me motivated to provide more and better content
@boomkablamo
@boomkablamo Жыл бұрын
I want to give you a huge thank you. I've been struggling with this for days due to other tutorials being outdated. You really saved the day.
@BoualiAli
@BoualiAli Жыл бұрын
Glad I could help!
@alvinimbuka8283
@alvinimbuka8283 Жыл бұрын
Very awesome tutorial, great explanations on the concepts, easy to follow along. I have really learned alot Ali. Looking forward to learn more courses on Springboot and Java.
@BoualiAli
@BoualiAli Жыл бұрын
Thank you so much for your feedback 🙏
@Samuelfanu
@Samuelfanu Жыл бұрын
Thank you so much for this fantastic Spring Security video! It was incredibly helpful and provided me with valuable insights. I really appreciate the clear explanations and the practical examples demonstrated throughout the tutorial. Your expertise and teaching style made it easy for me to grasp the concepts.
@BoualiAli
@BoualiAli Жыл бұрын
Glad it was helpful!
@BoualiAli
@BoualiAli Жыл бұрын
COUPON Code: *EARLYBIRD20* => Spring Data J PA course: aliboucoding.com/p/the-full-guide-to-master-spring-boot-data-jpa
@rustamnarayan2376
@rustamnarayan2376 Ай бұрын
I just finished watching this tutorial, and I'm incredibly impressed by the level of explanation presented throughout the video. Thanks to Bouali, I've been able to successfully complete a task I've been working on for the past week. Thank you so much for your help! You're truly a lifesaver. God bless you!
@la-dev
@la-dev 11 күн бұрын
And how you're going to handle the situation that most of the methods are deprecated now. I'm new and I need you help if it is the right way to learn or this source is already old by now?
@rustamnarayan2376
@rustamnarayan2376 8 күн бұрын
@@la-dev just follow the video and I assure you some googling would rescue you in case there are such issues. However, I did not encounter it as he is using spring boot 3 which is latest :)
@la-dev
@la-dev 8 күн бұрын
Thanks @@rustamnarayan2376
@ivandvoinenko5449
@ivandvoinenko5449 Жыл бұрын
Hello, it was a great step-by-step tutorial. The things that weren't clear to me became clear after I watched this video for the second time. The only moment (just statistical) - the token expiry date wasn't 24h from the moment of creation. 1000 ms -> 1s; 60 * 1000 -> 1m; 60 * 60 * 1000 -> 1h. So adjustment should be settled to 24 * 60 * 60 * 1000. Your token expiry date is 24 m.
@BoualiAli
@BoualiAli Жыл бұрын
True, but just for the sake of the tutorial I removed the *24 to have short living token. Sorry for the confusion
@priya-bp5ch
@priya-bp5ch 2 ай бұрын
Your tutorials are really helpful for me as a beginner. Thanks a lot!!! Your way of teaching is really nice and I feel if you show an implementation video at the start of the tutorial we can easily understand what we are going to build Again, thanks a ton!!!!
@ibrahimabdellatif186
@ibrahimabdellatif186 4 ай бұрын
جزاك الله خير It's amazing content
@phanimc11211
@phanimc11211 11 ай бұрын
Thank you so much for this fantastic Spring Security video!
@BoualiAli
@BoualiAli 11 ай бұрын
Glad you enjoyed it!
@eddykokokenfack1362
@eddykokokenfack1362 Жыл бұрын
Amazing course, i get all workflow about jwt spring security, how to extractAllClaims, single claims, how to use JWTAuthenticationFilter and more. Thanks for this update spring security jwt and hope you take care of you!! Great time!!
@BoualiAli
@BoualiAli Жыл бұрын
Fantastic!
@tay_fay
@tay_fay 9 ай бұрын
Many thanks! Your tutorials are absolutely fantastic. Pure gold! The content, your delivery and the speed - everything is just perfect. Sending loads of love your way!
@BoualiAli
@BoualiAli 9 ай бұрын
Glad you like them!
@theold_new1631
@theold_new1631 4 ай бұрын
Thank you from South Korea!
@guratete
@guratete 3 ай бұрын
how is the job Market in Seoul for Java Devs, I am in China and looking for new opportunities in other countries
@grozageorge2887
@grozageorge2887 Жыл бұрын
Perfect! This is the most well explained tutorial I have seen and I have seen many regarding the discussed subject.
@BoualiAli
@BoualiAli Жыл бұрын
Happy you liked it
@phanimc11211
@phanimc11211 11 ай бұрын
Very awesome tutorial, great explanations on the concepts, easy to follow along
@BoualiAli
@BoualiAli 11 ай бұрын
Glad you liked it!
@lurodev
@lurodev Жыл бұрын
This is just what I needed, great explanation and the most important, it works!!! , Thanks and greetings from Colombia.
@BoualiAli
@BoualiAli Жыл бұрын
Great to hear! Greetings from 🇹🇳
@anirudh514
@anirudh514 6 ай бұрын
Thank you so much, very well explained! Very useful!!
@supun_sandaruwan
@supun_sandaruwan Жыл бұрын
this is the video perfectly understand the spring security for me. Thank you so much @Bouali Ali
@BoualiAli
@BoualiAli Жыл бұрын
Happy you liked it
@ahmedelamri5942
@ahmedelamri5942 Жыл бұрын
Great Video, you saved my life on a bug that I've been searching for so long since I migrated to spring 3.0, Keep it up! from Tunisia
@BoualiAli
@BoualiAli Жыл бұрын
My pleasure bro I like Tunisian people 🇹🇳
@michelvandeweetering4450
@michelvandeweetering4450 Жыл бұрын
Wonderful ! thanks for the effort and clear tutorial!
@BoualiAli
@BoualiAli Жыл бұрын
My pleasure
@JamesMiller-xs8zz
@JamesMiller-xs8zz 11 ай бұрын
Thank you very much. you save me and my university project. Subscribed
@BoualiAli
@BoualiAli 10 ай бұрын
Glad I could help!
@loqol5874
@loqol5874 4 ай бұрын
thank you very much for the information and excellent explanation
@BoualiAli
@BoualiAli 4 ай бұрын
Glad it was helpful!
@indranilgoswami1500
@indranilgoswami1500 Жыл бұрын
Great Video Bouali ! I have learned many things. Subscribed your channel also . Thanks a lot !
@BoualiAli
@BoualiAli Жыл бұрын
Great to have you
@explorer9240
@explorer9240 2 ай бұрын
love the way u teach (:
@raoufzouaoui6931
@raoufzouaoui6931 Жыл бұрын
Great work and content! Thank you very much for this.
@BoualiAli
@BoualiAli Жыл бұрын
Happy you like it
@userjred2866
@userjred2866 Жыл бұрын
Thanks a lot man, your explanations are the best! Subscribed! I will see the refresh token vid now :)
@BoualiAli
@BoualiAli Жыл бұрын
Thank you 🙏. Check the spring security playlist for more videos
@MrZeroinside
@MrZeroinside Жыл бұрын
Great video man, I have recently started learning Springboot and there wasn't many content for 3.0 out there, was exactly looking for this, the way you explained everything was very well done and understable, Thanks and Keep it up!
@BoualiAli
@BoualiAli Жыл бұрын
Thank you for the great feedback.
@user-wh3lx1hz8d
@user-wh3lx1hz8d Жыл бұрын
I had the same issue and it turns out I had left User's isEnabled() to false, when it should be true.
@laylaelaam9507
@laylaelaam9507 Ай бұрын
thank uuuu so much !!!
@alexkouasseu6396
@alexkouasseu6396 Жыл бұрын
Great Job Ali, thans is the best Tutorial I ever see. I like and Subscribe right now.
@BoualiAli
@BoualiAli Жыл бұрын
More thank happy to have here
@poragjyoti4190
@poragjyoti4190 Жыл бұрын
This video made all my doubts clear. Thank you so much.
@BoualiAli
@BoualiAli Жыл бұрын
Really happy you liked it
@TiagoSilva-ge5cp
@TiagoSilva-ge5cp Жыл бұрын
Great explanation !! Thank you very much, u're awesome
@BoualiAli
@BoualiAli Жыл бұрын
Glad you liked it!
@jovaniecabatuan6364
@jovaniecabatuan6364 Жыл бұрын
OMG this is the most awesome tutorial I've ever watched
@BoualiAli
@BoualiAli Жыл бұрын
Thank youuuuuu. Happy to know that
@liberaamoremio
@liberaamoremio 8 ай бұрын
Thank you so much, I followed this guide and everything works great. I have a question though. In the isTokenValid method of JwtService we check if the username(email) from the parameter userDetails is equal to the username found in the token. However the parameter userDetails is always aquired from the username found in the token (e.g. in AuthenticationService or in JwtAuthenticationFilter). So the way I see it we extract the username from the token and then check if the extracted username is equal to the username found in the token. Wont that always be true?
@paulnzioki8782
@paulnzioki8782 Жыл бұрын
Amazing content. Thank you for your good work to enable us acquire skills.
@BoualiAli
@BoualiAli Жыл бұрын
really happy I helped you learn
@sardorbekyorqulov
@sardorbekyorqulov 7 ай бұрын
Thank you so much bro ! Best tutorial I've ever seen.
@BoualiAli
@BoualiAli 4 ай бұрын
Glad you think so!
@GloomDev
@GloomDev Жыл бұрын
Gold. 👍 Thank you.
@BoualiAli
@BoualiAli Жыл бұрын
Happy you liked it! Thank you too!
@merxxibeaucoup9093
@merxxibeaucoup9093 Жыл бұрын
Thank you very much for this. this was great. you have gained a subscriber forever!
@BoualiAli
@BoualiAli Жыл бұрын
So happy and proud to have you here
@Samuel-ow5jx
@Samuel-ow5jx 2 ай бұрын
Thank you Ali!
@user-br7ip7xe7j
@user-br7ip7xe7j Жыл бұрын
Absolutely great tutorial!
@BoualiAli
@BoualiAli Жыл бұрын
Happy you liked it
@juanpablo-mu6wq
@juanpablo-mu6wq Жыл бұрын
What a great video! you have gained a subscriber forever!
@BoualiAli
@BoualiAli Жыл бұрын
You’re welcome forever
@andriikorniienko
@andriikorniienko 2 ай бұрын
that's perfect, please keep on keeping on!! could you please tell how you learned it and how you would recommend people learn it?? imho documentation usually gives the "What" about everything in it, not "Why"
@HamzaAlAzhar
@HamzaAlAzhar 3 ай бұрын
I just discovered your channel, what a great content, Allah y3tik lkhir
@BoualiAli
@BoualiAli 3 ай бұрын
Thank you so much 😊
@basalat1131
@basalat1131 Жыл бұрын
this tutorial is very helpful. thanks a million
@BoualiAli
@BoualiAli Жыл бұрын
My pleasure
@mahmoudotri6103
@mahmoudotri6103 3 ай бұрын
baraka al Allahu fik. Keep up the good work!
@BoualiAli
@BoualiAli 3 ай бұрын
my pleasure Check the new one, it is more updated with no deprecations
@mahmoudotri6103
@mahmoudotri6103 3 ай бұрын
@@BoualiAli Awesome! may you share the link for it?
@BoualiAli
@BoualiAli 3 ай бұрын
@@mahmoudotri6103 check the videos and you will notice it. It is a recent upload
@devynlab
@devynlab Жыл бұрын
Loving this. Great start as I migrate to Spring Boot 3. Thanks man 🔥.
@BoualiAli
@BoualiAli Жыл бұрын
Happy to know 🔥
@ramadaniotfi3537
@ramadaniotfi3537 Жыл бұрын
Good job ,and i realy appreciate you so much .
@BoualiAli
@BoualiAli Жыл бұрын
Thank youuuu
@laminefaty9340
@laminefaty9340 Жыл бұрын
Intéressant ! mister bouali ...
@BoualiAli
@BoualiAli Жыл бұрын
Thank you
@josue10hd
@josue10hd 10 ай бұрын
muchas gracias por la explicación y por compartir el repositorio 🤓
@BoualiAli
@BoualiAli 10 ай бұрын
My pleasure!
@777MALexa
@777MALexa Жыл бұрын
thank you for this video!
@BoualiAli
@BoualiAli Жыл бұрын
My pleasure
@furiUfc
@furiUfc 8 ай бұрын
Great Video, thanks a lot
@BoualiAli
@BoualiAli 8 ай бұрын
Glad you liked it!
@Ezzedini
@Ezzedini Жыл бұрын
great content, I'll be finishing the one on amigos code cause I'm still using spring 2.7, I'll book this video once I upgrade!
@BoualiAli
@BoualiAli Жыл бұрын
That’s good
@BKEuphony
@BKEuphony Жыл бұрын
Too good. Awesome.
@BoualiAli
@BoualiAli Жыл бұрын
🙏 thank you
@7sudo
@7sudo Жыл бұрын
thank you khouya, merci beaucoup pour ton effort.
@BoualiAli
@BoualiAli Жыл бұрын
My pleasure
@web3made
@web3made 5 ай бұрын
awesome tutorial!
@BoualiAli
@BoualiAli 4 ай бұрын
Glad you liked it!
@mohamednibras53
@mohamednibras53 Жыл бұрын
Excellent tutorial
@BoualiAli
@BoualiAli Жыл бұрын
Thank you
@mohammedjoubba318
@mohammedjoubba318 Жыл бұрын
thank you so much for the course, it is very helpful. I hope you could make a continuation video implementing the APIs in Angular. I 'm really stuck right now
@BoualiAli
@BoualiAli Жыл бұрын
Happy you liked it I'm already preparing a video for that
@oOalex74Oo
@oOalex74Oo 11 ай бұрын
Amazing course, I learned so much! It is even more amazing the code you gave on github, however I wish I could have some explanations on all the additional stuff there is in the repo
@BoualiAli
@BoualiAli 10 ай бұрын
Happy you liked it! Just follow the playlist order and you will get each line of the code
@hafedhbaazouzi3617
@hafedhbaazouzi3617 Жыл бұрын
thanks for your efforts
@BoualiAli
@BoualiAli Жыл бұрын
Welcome 🙏
@lucasfkam
@lucasfkam Жыл бұрын
For the Spring Security package to be complete on your channel, could you please make a video explaining how to configure CORS using Spring Security? For example, as routes from other origins that need authentication with the head "Authorization" in the request, I would be very grateful
@BoualiAli
@BoualiAli Жыл бұрын
Coming soon 😁
@muniapriyansu8805
@muniapriyansu8805 Жыл бұрын
I was struggling to learn this, thank you so much for this video. It helped a lot
@BoualiAli
@BoualiAli Жыл бұрын
I’m happy to help
@muniapriyansu8805
@muniapriyansu8805 Жыл бұрын
@@BoualiAli what changes to make in order to specifically allow USERS to one endpoint? .hasRole("USER") doesnt work SecurityConfiguration
@BoualiAli
@BoualiAli Жыл бұрын
@@muniapriyansu8805 you need to add the annotation @enableglobalsecuritymethod on the security config class and the @preuathorize will work like a charm I have another spring security in the same playlist that explains authorization and how it works
@fahrican9708
@fahrican9708 10 ай бұрын
really great video!!!! thanks!!! I would adapt the title just put (registration & login) because KZbin does not show your video, when searching for spring boot registration & login
@BoualiAli
@BoualiAli 9 ай бұрын
Thanks for the tip!
@mike6311
@mike6311 Жыл бұрын
Thank you so much for all your help!! I am struggling to understand why I am receiving a 403 error when I try to do a post request to /authenticate. Do the token generation is working great but I cannot get the authenticate user to work. The only difference between my code and yours is that I use username to validate instead of email. Can you please help? Thank you!
@BoualiAli
@BoualiAli Жыл бұрын
1- Check if you are passing an old token in the header 2- check if you have duplicate user (same username) 3- compare with code 4- debug your code and check what exception is thrown by the authManagener.uathenticate() ==> please check the debugging video if this is something new to you
@eugenheise846
@eugenheise846 Жыл бұрын
Hi Ali, if possible, could you show the imports of the class briefly after you finish with a class, for comparison next time? Thank you!
@BoualiAli
@BoualiAli Жыл бұрын
Check the code on Github
@ahouzimohamed6387
@ahouzimohamed6387 Жыл бұрын
Thank you for your efforts, your brother from morocco.. Keep it up 🙂
@BoualiAli
@BoualiAli Жыл бұрын
My pleasure
@dalikrimi2277
@dalikrimi2277 Жыл бұрын
Great video Bro keep going 😀😀😍
@BoualiAli
@BoualiAli Жыл бұрын
Thank you, I will
@praveens2272
@praveens2272 Жыл бұрын
I am subscribed
@BoualiAli
@BoualiAli Жыл бұрын
Really happy you liked it
@odilhonislomov8954
@odilhonislomov8954 11 ай бұрын
Thank you 🎉
@BoualiAli
@BoualiAli 10 ай бұрын
You’re welcome 😊
@akadeadahot7067
@akadeadahot7067 4 ай бұрын
Hello sir i saw video tutorial n these are awesome like each n every topic will convered in videos. One request from my side for desktop native application using electron js with angular in details project like books library project i possible please consider it in your upcoming playlist because no one is on you tube who is doing electron js tutorial.
@BoualiAli
@BoualiAli 3 ай бұрын
I will try my best
@ablayefaye7157
@ablayefaye7157 Жыл бұрын
great!
@BoualiAli
@BoualiAli Жыл бұрын
Thanks
@darkmagician2519
@darkmagician2519 Жыл бұрын
that is the best vedio about jwt implementation so far, thank you for your simple explanation that even a new user of the spring framework could understand clearly. i have a question please if you don t mind, I'm using spring mvc with thymeleaf, i don t know how to send the jwt token in the header with thymeleaf like in your case with postman you sent it in the authorization type bearer token, and there is no one talking about it thank you
@adrianfee9131
@adrianfee9131 Жыл бұрын
I am also trying to figure this out
@darkmagician2519
@darkmagician2519 Жыл бұрын
@@adrianfee9131 i manage to do it using session like instead of retrunin the jwt token to the user and send it from the header you can just save it into the session than in the dofliter function you take the jwt token and validate it from the session i ll join the code below i hope this helps
@darkmagician2519
@darkmagician2519 Жыл бұрын
i don t know if it s the right way to do it but it is working
@krige
@krige Жыл бұрын
16:50 You don’t need to specify the driver-class-name since Spring Boot can deduce it for most databases from the url. See Spring Boot 3.0 Data docs.
@BoualiAli
@BoualiAli Жыл бұрын
True, but if I don’t specify it people will ask about and I forgot to mention that in the video. Good comment 👍
@vageeshanvageesh5583
@vageeshanvageesh5583 Жыл бұрын
Great content, thank you. can you please provide a tutorial in Oauth2 implementation in spring boot 3 (Authorisation server + Resource server) using JWT?
@BoualiAli
@BoualiAli Жыл бұрын
Working on it
@achrefgassoumi4478
@achrefgassoumi4478 Жыл бұрын
Good job aloulou ;)
@BoualiAli
@BoualiAli Жыл бұрын
thank you 3chiri
@hackpiece3094
@hackpiece3094 9 ай бұрын
This is soooooo long ! Thank you for doing everything step by step but its my request please bring a Course on Spring Security where you can explain things on a slow pace. That would help us get more clarity.
@BoualiAli
@BoualiAli 9 ай бұрын
Sure
@user-wb8st1ro5v
@user-wb8st1ro5v Ай бұрын
Why, when we add AthenticationProvider to SecurityFilterChain, we get a warning in the console: Global AuthenticationManager configured with an AuthenticationProvider bean. UserDetailsService beans will not be used for username/password login? Maybe we need to create a private method in the SecurityConfig class rather than a Bean in the ApplicationConfig class?
@manospat1066
@manospat1066 2 ай бұрын
Great! One question, you take the jwt of the authenticate(log-in) to send the Demo Controller request. If I use jwt I got from Register, it is the same ? In simple words, if I want log-in directly after the register (and not log in again), is there any extra step I need to do? (for example set SecurityContextHolder). I guess both in log-in and Register the SecurityContextHolder must be set ! Thanks !
@kunamanenisaikrishnakunama6990
@kunamanenisaikrishnakunama6990 11 ай бұрын
❤️👏👏
@vijayank923
@vijayank923 Жыл бұрын
Awesome, I love your explanation. Can you make video on Spring boot 3.0 - Webflux with JWT Token
@BoualiAli
@BoualiAli Жыл бұрын
I will take note of that. I’m preparing a new video that you’re gonna love absolutely
@vijayank923
@vijayank923 Жыл бұрын
@@BoualiAli I’m waiting
@samymohsen505
@samymohsen505 7 ай бұрын
I can't really express how you are amazing Mr. Bouali. The explanation is clear and straight to the point. I wanted to ask you if there is a way to not to hit the database for each request as this will be overhead for it. can we make it in the register & authenticate part only?
@BoualiAli
@BoualiAli 7 ай бұрын
You can implement caching
@samymohsen505
@samymohsen505 7 ай бұрын
can you please recommend me a good way for In memory caching? or any other way that make me avoid using things like Redis aka other database with its own server?@@BoualiAli
@alexakos1992
@alexakos1992 2 ай бұрын
Thank you very much for the content! Can you write for us the non depricated solution for setSigningKey() and parseClaimsJws()?
@BoualiAli
@BoualiAli 2 ай бұрын
Yes, check the playlist and the videos and order by publish date
@mokamaher1024
@mokamaher1024 6 ай бұрын
thx
@Zentex2307
@Zentex2307 Жыл бұрын
Hi! Great Tutorial! One of the best I ever seen. I have only one problem, I can still add more users with the same email. You don't check this in tutorial too.
@BoualiAli
@BoualiAli Жыл бұрын
Thanks for the comment. Yes duplicated users are not prevented. Add @Column(unique=true) on the email field and it will fix it
@_U_will_always_shine
@_U_will_always_shine Жыл бұрын
Randomly found this channel. Wonderfully explained. Thanks a lot. Just a request, could you paste that key generator url in the description?
@BoualiAli
@BoualiAli Жыл бұрын
You can check the code in my github account (link in the description)
@hemanthkumarallam3894
@hemanthkumarallam3894 Ай бұрын
Hi, I have implemented your project for me for all the api in Auth Controller I am getting 403 error.
@husseinali1199
@husseinali1199 Жыл бұрын
thank you for your tutorial i hope you do tutoril for spring boot microsrvice securty JWT
@BoualiAli
@BoualiAli Жыл бұрын
I’m preparing something already
@keymalandre9111
@keymalandre9111 8 ай бұрын
Hello what ist the next video it's very interesting
@GauravKawatra-b5p
@GauravKawatra-b5p 20 күн бұрын
Hy, Can you add courses on Data Engineering y-using AWS, ETL pipelines, ELT pipelines, etc.
@emometalpunk
@emometalpunk Жыл бұрын
Thank you for your awesome tutorial! I learn a lot from your video. Let's say if we had multiple microservices and Spring Cloud Gateway routing to process requests to those (downstream) services. I was wondering if you could let me know how we can apply the jwt from your video (user microservice) to other microservices as a global one. Thank you once again for your time and consideration!
@BoualiAli
@BoualiAli Жыл бұрын
It works the same way. Just implement it on the api gateway level
@BoualiAli
@BoualiAli Жыл бұрын
Really happy to have you here
@soulayma.6948
@soulayma.6948 Жыл бұрын
Hi thanks for the tutorial The register works fine and generates a token however when i try to test the authenticate it gives me a 403 Forbidden
@BoualiAli
@BoualiAli Жыл бұрын
Check that you correctly pass the credentials and you have your password encoder bean
@user-wh3lx1hz8d
@user-wh3lx1hz8d Жыл бұрын
did you manage to fix it? I have the same issue
@lageraho3508
@lageraho3508 Жыл бұрын
Am using Spring tool suite......At 1:46:26..... var is deprecated and after User......User.builder option is not showing........
@BoualiAli
@BoualiAli Жыл бұрын
You need to install the lombok plugin. Check the official website of lombok and follow the steps for eclipse
@chinmayeeyeladi1172
@chinmayeeyeladi1172 Жыл бұрын
@@BoualiAli I have installed lombok plugin still facing same issue
@jasonadventure2265
@jasonadventure2265 Жыл бұрын
It's very clear logic, thanks a lot Bouali
@BoualiAli
@BoualiAli Жыл бұрын
Glad you think so!
@zqgAFf
@zqgAFf Жыл бұрын
Thank you very much for explaining to us how jwt works under the springboot 3 to do whole authentication part , would you give a follow-up with the role based version in the next comming up videos?😁
@BoualiAli
@BoualiAli Жыл бұрын
Sure thing!
@zqgAFf
@zqgAFf Жыл бұрын
@@BoualiAli thank u so much, after watching your old 2.0 role based version and your comment down below I assume using EnableMethodSecurity as well as preAuthorize can do this . But for controlling the role to limit on CRUD or refresh token I have no clue
@garvisrobot9274
@garvisrobot9274 2 ай бұрын
Some routes working some goving errors 404 unablw to trace cause 😢😢😢😢😢
@pip3936
@pip3936 Жыл бұрын
Can you please make a tutorial about authentication and authorization exception handling. Like where to throw exceptions if invalid credentials were prompted or JWT related exception 🙏
@BoualiAli
@BoualiAli Жыл бұрын
Check the exception handling video. You have the answer there
@nikolatodorovic7198
@nikolatodorovic7198 Жыл бұрын
I've been building a Rest API and I can't help but ask aren't these response codes actually completely wrong? Atm when you're sending a request without the authorization header you're getting a 403 - Forbidden meanwhile that should result in 401 unauthorized as the user wasn't recognized by the server? Furthermore every error occured seems to be followed up by a 403, including both routes that don't exist, methods that aren't allowed on specific routes and errors that occur like validation and such. Any follow up to that?
@BoualiAli
@BoualiAli Жыл бұрын
Sorry, I didn’t understand the issue
@nikolatodorovic7198
@nikolatodorovic7198 Жыл бұрын
@@BoualiAli 1:56:24 when sending the following request to the endpoint shouldn't the response be a 401 unauthorized as no authorization header was present but instead you've got a 403 which indicated that the server did indeed recognise who is making the request and simply doesn't have the permission to access the resource?
@BoualiAli
@BoualiAli Жыл бұрын
@@nikolatodorovic7198 it returns 403 too if the credentials are bad
@lorenzoandreoli
@lorenzoandreoli Жыл бұрын
​ I agree with @Nikola Todorovic. if you request a protected resource without sending the authorization token, like in 1:56:14, you should get 401 instead of 403
@BoualiAli
@BoualiAli Жыл бұрын
@@lorenzoandreoli just return the code that suits you. I showed you how to implement and you can always change anything depending on your need
Spring Security explained with no code
16:51
Bouali Ali
Рет қаралды 19 М.
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 11 МЛН
КТО ЛЮБИТ ГРИБЫ?? #shorts
00:24
Паша Осадчий
Рет қаралды 2,7 МЛН
WHO CAN RUN FASTER?
00:23
Zhong
Рет қаралды 45 МЛН
Kids' Guide to Fire Safety: Essential Lessons #shorts
00:34
Fabiosa Animated
Рет қаралды 16 МЛН
What Is JWT and Why Should You Use JWT
14:53
Web Dev Simplified
Рет қаралды 1,1 МЛН
Spring Security - Refresh token
26:20
Bouali Ali
Рет қаралды 32 М.
Spring Boot Tutorial For Beginners
2:31:28
Bouali Ali
Рет қаралды 28 М.
Spring Security | FULL COURSE
4:57:58
Amigoscode
Рет қаралды 941 М.
API Testing Using Postman | Crash Course
3:27:51
Mukesh otwani
Рет қаралды 90 М.
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 11 МЛН