Spring Boot and Spring Security with JWT including Access and Refresh Tokens 🔑

Поделиться
HTML-код
  • Опубликовано: 31 май 2024
  • In this tutorial you will learn how to secure backend applications using JWT, Spring Boot and Spring Security. You will implement JWT access and refresh tokens.
    This is brought to you by GetArrays - / @getarrays
    #springboot #springsecurity #jwt
    🙊 Subscribe to Amigoscode - bit.ly/2HpF5V8
    ► Courses Available for free here - amigoscode.com/courses
    ► Join Private Facebook Group - / 456035171490753
    ► Join Discord - bit.ly/2wL029v
    ⭐ Table Of Contents ⭐
    00:00 Intro
    01:54 What is JWT
    05:55 Spring Boot Backend
    47:31 Spring Security
    58:57 Authentication and Authorisation
    01:10:22 JWT
    01:49:28 JWT Refresh Token
    🙊 Here are the goods for all my videos video:
    ► Recommended Books
    Clean Code
    - amzn.to/2UGDPlX
    HTTP: The Definitive Guide
    - amzn.to/2JDVi8s
    Clean Architecture
    - amzn.to/2xOBNXW
    ► Computer and Monitor
    New Apple MacBook Pro
    - amzn.to/3464Mmn
    Dell 27 INCH Ultrasharp U2719D Monitor
    - amzn.to/2xM3nW1
    Double Arm Stand Desk Mount
    - amzn.to/3aYKKfs
    USB C Hub Multiport Adapter
    - amzn.to/2Jz7NlL
    ► Camera Gear
    Sony ILCE7M3B Full Frame Mirrorless Camera
    - amzn.to/346QIJn
    Sigma 16 mm F1.4 DC DN
    - amzn.to/2wbic3Q
    Sigma 33B965 30 mm F1.4 DC DC
    - amzn.to/39G37Fd
    Awesome Screen Saver
    - github.com/JohnCoates/Aerial
    IDE I use for coding
    - Iterm
    - VsCode
    - GoLand
    - IntelliJ
    - Sublime
    💯 You can also follow me here:
    ► Don't forget to subscribe | bit.ly/2HpF5V8
    ► Join Closed Facebook Group for discussion and early access videos and courses | bit.ly/2FbuIkx
    ► Follow me on Instagram | bit.ly/2TSkA9w
    ► Join Discord - bit.ly/2wL029v
    ❤️ Thanks for watching
  • НаукаНаука

Комментарии • 880

  • @saywuat
    @saywuat 2 года назад +45

    I'm impressed - you provided a full example of a JWT implementation. I can follow each step and you explain every step very well. Trying to look all of this stuff up by myself would have cost me months. THANK YOU, SIR!

  • @gficeis
    @gficeis 2 года назад +7

    Simple, direct and efficient. You have the gift of explaining!
    Nothing more to say. Thank you sir!

  • @Kevinppaulo
    @Kevinppaulo 2 года назад +3

    I just got back at studying Spring, and this video came in PERFRECT timing. Love your content, thank you!

  • @nunoaparicio4426
    @nunoaparicio4426 2 года назад +14

    Yesterday I was looking for this exact tutorial on your channel and today you upload this! Just perfect! Thanks 😁

  • @lts8683
    @lts8683 2 года назад +1

    Your video contains a lot of best practices, that's among things that distinguish it from other tutorials.
    Thank you and keep going.

  • @programmer4226
    @programmer4226 2 года назад +8

    Man you explain everything so well and in detail. Very few people on the internet do this. Thank you ! :)

  • @alfredomenezes8814
    @alfredomenezes8814 2 года назад +3

    Amazing tutorial, the best one about Spring Security and JWT I've seen so far, thank you very much for posting this for free!

  • @preto115
    @preto115 2 года назад +4

    Thanks so much for spreading out your wonderfull knowlegde on this subject. It simply blows my mind how you master the subject and how you are able to explained every single point in the code and how is your profound knowledgement to resolve error when they show up! Congratulations for your expertise on teaching also... I am a true begginner in this area and the way you master this subject is really wonderful.

  • @matheusbarreto7656
    @matheusbarreto7656 Год назад +1

    Man, you saved me. This is exactly I was looking for, with examples and the explanation of each line you're into.

  • @anonymous-cb2bi
    @anonymous-cb2bi 2 года назад

    Amazing work, i got few questions from your precedent video about spring security but this one helped me to comprehend better, not even asked that you provided for us, thanks a lot pal :)

  • @amarok3460
    @amarok3460 2 года назад +1

    Your videos are amazing I rarely saw such a good content with good explanations when it is needed. Great job and thank you!

  • @jafarsadik4335
    @jafarsadik4335 2 года назад

    His voice is so calm and soothing, it didn't stress me at all. Good job!

  • @yassinebousseha8191
    @yassinebousseha8191 Год назад +1

    after searching for clean and understandable explanation for 3 months
    i finally found the best one . nice & clean

  • @avm0101
    @avm0101 Год назад +8

    This is a fantastic tutorial. Even-though some of the concepts like "WebSecurityConfigurerAdapter" are deprecated, it was good to know. This is the first time I have actually understood the flow of authentication and authorization. Thank you.

  • @Yiliu
    @Yiliu 2 года назад +2

    That's perfectly matched what I need! Thanks for the high-quality tutorial.

  • @HouariZegai
    @HouariZegai 2 года назад +25

    Amazing like always Nelson!
    Thanks for the richest content you provide to the community.

  • @azizmavlyanov3145
    @azizmavlyanov3145 2 года назад +4

    As usual, your tutorial/course is awesome. Thank you so much!

  • @DDHDTV
    @DDHDTV Год назад

    I'm already working as developer using Spring (at a major global company) but the code is so unstructured. What you're teaching is really clean and best practice.so good

  • @abuzeralaca
    @abuzeralaca 2 года назад

    That was one of the best tutorial I have seen in youtube. As always you deserve like and comment bro. Good job.

  • @optinihilis
    @optinihilis 2 года назад

    I love you for this. You are the only one that knew how to explain. Thank you so much! Liked and Subscribed!

  • @OldManRog
    @OldManRog 2 года назад +100

    This was a fun project, I learned how to secure my API routes, how to authenticate & authorize as well as sending a refresh token. It would be awesome if you do this project again but with the best practices. Maybe like a follow up or more advanced video. Thank you both of you guys for providing such an informative tutorial.

    • @brandonalfaro42
      @brandonalfaro42 9 месяцев назад

      I know I'm a bit late but did you also name your main entity class "User". I named my Employee and then used the User class from the security package. And I'm struggling to figure out which one to use for the refresh token part.

    • @anasjiyar8517
      @anasjiyar8517 4 месяца назад

      @@brandonalfaro42 you have to use your personal class User, beacause he use the repository on it.

  • @junioryao3458
    @junioryao3458 2 года назад

    Best security course hands-on I have seen so far , take my hat off

  • @Jordan-rv8gl
    @Jordan-rv8gl Год назад

    Really amazing content, Amigo! You're awesome at explaining things.

  • @gradientO
    @gradientO 2 года назад +1

    Gotta love how the video quality increases each time! Well done Nelson

    • @samadanvarov4264
      @samadanvarov4264 2 года назад

      IF FBI watch this security video . We also must watch this video ))

  • @ilovekimseungmin2027
    @ilovekimseungmin2027 2 года назад

    thank you, i love well-rounded tutorials like this. very useful.

  • @von_uo9317
    @von_uo9317 Год назад

    Thank you for detailed explanation of JWT. And your videos are really awesome love them !!

  • @kevin2908k
    @kevin2908k 2 года назад

    Very good tutorial!
    In my opinion, it is currently the best on youtube for that topic

  • @WaclawShuminski
    @WaclawShuminski 2 года назад +3

    OMG It's really great tutorial! Thank you man a lot!
    Also, we can place constant URLs such as "/login" or "/token/refresh" as static final fields in SecurityConfig and just use them wherever we want - in Filters, Resource Controllers, anywhere. And we just have to edit them once only at that point.

    • @kurtne4892
      @kurtne4892 Год назад

      Good tip Constants are quite useful here.

  • @Tooxcade
    @Tooxcade 2 года назад

    Salaam Brother - Eid Mubarak. Long waited for video. MANY THANKS

  • @ar-ul5kj
    @ar-ul5kj Год назад

    Excellent video mate! Thank you for sharing knowledge in such clear manner :)

  • @CiaphasCain21
    @CiaphasCain21 2 года назад

    Thanks for this tutorial! I've just learned about refresh token mechanism and wanted to find any example in Spring Boot

  • @opendeskca6333
    @opendeskca6333 2 года назад

    Beautiful course on Spring Security! Congratulations.

  • @algerianpublicwriter
    @algerianpublicwriter 2 года назад

    I benefited a lot from this course thank you very much brother Nelson

  • @adebisiolaoluwa2125
    @adebisiolaoluwa2125 2 года назад

    Nelson. thank you for your dedication... i started spring couple of months ago and you have been a blessing to me.. kindly do tutorial on sign up/ register, login and log out in spring boot api using JWT

  • @fangwilliam3210
    @fangwilliam3210 Год назад

    Thank You bro for this wonderful lesson!i finished this lession , simple, efficient, nothing more to say ! Thank you !:)

  • @abdulhakam9739
    @abdulhakam9739 2 года назад +1

    Thanks for the great explanation and tutorial. It really really helps me.بَارَكَ اللهُ لَكَ

  • @shahinkhalajestani8587
    @shahinkhalajestani8587 2 года назад

    Perfect. it was really useful . Ur content is always rich and I learned so much from U.
    Thank U amigoscode.

  • @borisjohnson2826
    @borisjohnson2826 2 года назад

    You are such a talented explanator. Thank you

  • @emanuelecaputo5271
    @emanuelecaputo5271 2 года назад

    this tutorial is pure gold! Awesome!

  • @eversonfgjr
    @eversonfgjr 2 года назад

    good job Nelson, excelent explanation as usual!

  • @hanhnhan7118
    @hanhnhan7118 Год назад

    I'm really impressed this tutorial.
    Thank you very much for sharing this amazing tutorial 😊

  • @user-hw2pr7zp4q
    @user-hw2pr7zp4q 2 года назад

    Im very excited to see your video course about jwt with refresh token, thanks:)

  • @aydarzakirov9690
    @aydarzakirov9690 Год назад

    Thanks a lot for your video lessons! They are great and easy to understand and implement!

  • @zeesh49
    @zeesh49 2 года назад

    thank you very much for creating this video...cleared my concepts on spring security

  • @florianmarco5669
    @florianmarco5669 2 года назад

    Thanks for the course, it's great and very well explained

  • @sathishkumarr7106
    @sathishkumarr7106 Год назад

    Really a best explanation and great video in RUclips for JWT implementation 👌🏻 keep rocking bro

  • @hienang4164
    @hienang4164 Год назад

    hello Amigoscode i'm from VietNam. First of all, thank you very much for the knowledge shared in this video. It helped me a lot in my final major assignment in college. Wishing you good health and good luck.

  • @rachidxx94
    @rachidxx94 Год назад

    Amazing course!! Very well done, thankyou!

  • @giorgibakradze8734
    @giorgibakradze8734 2 года назад

    This is a great tutorial. It helped me a lot. Thank you.

  • @andreasaltwegg576
    @andreasaltwegg576 2 года назад +4

    cool video .. only thing .. when sending a refreshToken to get a new accessToken, it is good practice to create a new refreshToken as well. small thing but it helps, that the refreshToken always has longer expire date-time then the accessToken.

  • @gamer-jg7rj
    @gamer-jg7rj 2 года назад

    Wow!This is a reaaaaaaaally good course. Thanks my friend.

  • @zora9906
    @zora9906 2 года назад

    I was looking for a video like this. Thank you

  • @dancalinfota6157
    @dancalinfota6157 2 года назад

    amazing and useful video! Thank you! exactly what I needed

  • @valentinmagnan30
    @valentinmagnan30 2 года назад

    Thanks a lot, this tutorial is just perfect! You're amazing 😀 !

  • @adwaithvenkatesh2640
    @adwaithvenkatesh2640 2 года назад

    Thanks for posting these videos . It's very helpful. Keep post such great content

  • @haykmkhitaryan3464
    @haykmkhitaryan3464 2 года назад

    Great course, nice explaination, thanks a lot guys !!!

  • @Adam-qn9uq
    @Adam-qn9uq 2 года назад

    🙏 Much much appreciated !!
    You're becoming my reliable resource for my study 👍
    As-salamu alaykum ☺

  • @yt-administrator
    @yt-administrator Год назад

    You helped me out a lot Amigo! I'm looking forward to an Angular masterclass.

  • @HamzaBaqoushi
    @HamzaBaqoushi 2 года назад

    Jazaka Allaho Khayr Bro Neslon! Just on time.

  • @rajdipbhattacharya1905
    @rajdipbhattacharya1905 2 года назад +1

    This video can't get any better. I've been searching for a video that explains the working of these security classes. All that regular courses included were spring auto security configuration, usage of jsp pages and not really getting into the core and playing around.

  • @phuang3
    @phuang3 2 года назад

    Thanks. This is exactly what I need for my project.

  • @sonamtenzin4457
    @sonamtenzin4457 2 года назад

    Wow! your video is really awesome and information you have depicted is precise. Love you and following your channel. Thank you so much for your video and love to see more videos in youtube.

  • @mohammadjavadnasrolla7302
    @mohammadjavadnasrolla7302 Год назад

    Thank you , this tutorial helps me a lot❤️

  • @chouyumo9227
    @chouyumo9227 2 года назад

    It's very helpful and perfect !! Thank you a lot!!

  • @momokoko9864
    @momokoko9864 2 года назад

    thank you, very helpful, really applied to my current problem

  • @anastasianaumko923
    @anastasianaumko923 Год назад

    Thank you! Very clear and thorough

  • @akhil7556
    @akhil7556 2 года назад

    This was the content that exactly I'm looking ....Thanks .

  • @jevzp
    @jevzp Год назад +1

    Hey Nelson, first of all I wanted to thank you for your videos and the work you put into them. I wanted to ask you, if you could make a updated version of this video, with the new Bean based Security configuration stuff. I just don't get it to work. It always breaks and I have tried pretty much everything that came in my mind or what I found on google. I am not using spring for that long so I am still kinda new to the whole topic. I would really appreciate it! Keep it up man!

  • @edwardreyes8341
    @edwardreyes8341 2 года назад

    Hey Nelson your content is always so useful, thanks for this videos, i hope to see videos about Spring Cloud, that would be great, Thank you so much!

  • @AbleToLiveHere
    @AbleToLiveHere Год назад

    This is brilliant. Thank you SO MUCH!

  • @defrankline
    @defrankline 2 года назад

    Damn! this tutorial is everything! Thanks Amiscode

  • @user-vc6do9gn5y
    @user-vc6do9gn5y 8 месяцев назад

    Best Video on RUclips about JWT Token in Spring Boot

  • @gafarraji
    @gafarraji 2 года назад

    Thank you Nelson for this great video.

  • @AshrafMMA
    @AshrafMMA 2 года назад

    I have been waiting for something like this for a while

  • @mohammedrehanjavedabdulkar4715
    @mohammedrehanjavedabdulkar4715 2 года назад

    Walaikum assalam brother... I m very happy to see you here...
    Doing great work brother...

  • @marcosferreira17br
    @marcosferreira17br Год назад

    Thank you for share your knowledge, this would be very helpful for my personal projects :D

  • @Satishkumar-rx7oy
    @Satishkumar-rx7oy 2 года назад

    Nice tutorial it helped me lot to understand spring security

  • @souhaibd2934
    @souhaibd2934 2 года назад

    Great tutorial brother! JazakAllah Khayr

  • @user-uy1rs4zg1k
    @user-uy1rs4zg1k 2 года назад

    It's a perfect tutorial. Thank you.

  • @vitog5412
    @vitog5412 Год назад

    Good job guys! Thank you for sharing your knowledge! 👌🌄

  • @rdogaldino04
    @rdogaldino04 Год назад +1

    Very nice, thanks for sharing your knowledge.

  • @sdmj730
    @sdmj730 2 года назад

    Awesome, please make more videos junior with authentication...oauth....
    Loved it!!!!!

  • @mehmetyazc536
    @mehmetyazc536 2 года назад

    That's perfect. Many thanks amigo ❤

  • @yasastn
    @yasastn Год назад

    really helpful tutorial, thanks mate

  • @nityanandbhaskar2155
    @nityanandbhaskar2155 2 года назад

    Helpful tutorial as always. 👍

  • @azhyabdalqadir4293
    @azhyabdalqadir4293 10 месяцев назад

    Thank u bro, it was great!

  • @kay2care
    @kay2care 2 года назад

    Spring Boot JWT made easy. Thank you.

  • @arunkumarjena18
    @arunkumarjena18 2 года назад

    Eagerly waiting for this type of tutorial.

  • @Alex-qy9zm
    @Alex-qy9zm 2 года назад +1

    Many tanks, Amigo! Perfect!

  • @dunayqudretli3382
    @dunayqudretli3382 Год назад

    Thanks man this tutorial is great!

  • @tanvirrabbi518
    @tanvirrabbi518 2 года назад

    Your tutorials are awesome :) Please make a tutorial about 'microservices with spring boot'

  • @deepikamahulia3530
    @deepikamahulia3530 2 года назад

    Thank you for this informative video. It helped me a lot.

  • @tolulopeayemobola1446
    @tolulopeayemobola1446 2 года назад

    Triple thumbs up, actually!!! This is good. What I would like to see? More on filters. Basically logging requests and responses (failed and successful) for every application that hits certain endpoints (and maybe another endpoint for them to be able to see this). I know actuator works fine for this and my second concern (keeping counts of API calls generally and per application), but I would like to see some custom implementation. There are a few more, but this would be a fine start, if it is possile

  • @SanjeevKulkarniWorld
    @SanjeevKulkarniWorld 2 года назад

    Great topic and easy to understand

  • @ahtishamaltaf6898
    @ahtishamaltaf6898 2 года назад

    Asslam o Alaikum Sir first of all great effort great course thank you soooooo much for that
    May grant you best reward for this

  • @hafiznecefli6711
    @hafiznecefli6711 2 года назад

    You made my day. Thanks a lot 👏

  • @rodrickngonyoku5042
    @rodrickngonyoku5042 2 года назад

    Finally, been looking for this.

  • @easyjet4299
    @easyjet4299 Год назад

    Thank you for your exhaustive explanation.

  • @oscargm1979
    @oscargm1979 2 года назад

    So good.I finally found a good teacher 😁 xd. Thank you,master!

  • @xiangziification
    @xiangziification Год назад

    Thanks for this wonderful tutorial