UPDATED: Spring Security 3.0 with Jwt Token | SecurityFilterChain | Spring API Authentication

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • Spring Security with Jwt Token | with SecurityFilterChain and without WebSecurityConfigurerAdapter.
    Discover the power of Spring Security in this comprehensive tutorial on Jwt token-based authentication for Spring API applications. Join us as we explore the intricacies of integrating Jwt tokens and the SecurityFilterChain in Spring Security. Learn how to implement robust API authentication and authorization mechanisms to secure your Spring applications effectively. Gain valuable insights into best practices for handling Jwt tokens, configuring security filters, and protecting your API endpoints. Whether you're a beginner or an experienced developer, this video will equip you with the knowledge and tools you need to enhance the security of your Spring applications. Watch now and level up your API authentication skills with Spring Security!
    Previous Video:
    • Spring Security with J...
    Spring Project:
    start.spring.i...
    PLEASE SUPPORT THE CHANNEL:
    Donate from $5
    Link: paypal.me/cypc...
    Thank you so much for watching, Please do like and subscribe

КОМЕНТАРІ • 21

  • @cypcode
    @cypcode  11 місяців тому

    Guys please do like and subscribe as 80% of views are not subscribed yet, subscribing is free as well as sharing, liking and commenting to motivate us to keep going. Thank you very much for watching

  • @gambiatec3318
    @gambiatec3318 11 місяців тому

    Nice!

  • @rayshadow6796
    @rayshadow6796 Рік тому +1

    Awesome we actually doing this now at uni here in Cape Town, link us with a git repo please?

    • @cypcode
      @cypcode  Рік тому +1

      Hi @ray thank you very much for watching and hope that you stay tuned moreover share the video and channel to other devs to grow the community. Please see the repo as requested: github.com/cypcodestudio/wonderbank
      Please do let me know if you need more clarity

  • @capybara1721
    @capybara1721 Рік тому +1

    Thank you so much dude! You saved a bunch of my nerve cells. The code from the spring documentation gave an error (::jwt is deprecated) and I killed a lot of time.

    • @cypcode
      @cypcode  Рік тому +1

      Hi @capybara1721 thank you for watching and it’s always a pleasure, you can also check me out if you need code reviews

    • @Mazzhot
      @Mazzhot Рік тому +2

      spring documentation SUCKS af

    • @ramanjaneyulupasupuleti2542
      @ramanjaneyulupasupuleti2542 Рік тому

      true bro spring documentation sucks@@Mazzhot

  • @ogw2
    @ogw2 4 місяці тому

    Thank you for this tutorial.
    Please can you share the repo with me, thanks

  • @adamspodniak5822
    @adamspodniak5822 Рік тому

    Very nice video, but im really having hard time trying to connect all that to the front-end...

    • @cypcode
      @cypcode  Рік тому +1

      Hi @adam thank you very much for checking our video, please confirm which front-end framework you are using and as this is a microservices based project you should be able to call the login REST API and pass in the login payload then response will have your JWT that you store on your session to then use it for all other subsequent requests

    • @adamspodniak5822
      @adamspodniak5822 Рік тому

      @@cypcode Im just making simple Thymeleaf frontend, i guess i will have to work with js then. I think i just need more time to understand it propperly. You entered the jwt token manually thats the part im struggleing with the most. Maybe ill rewatch the video agian. That could help

  • @zayedh8089
    @zayedh8089 11 місяців тому

    i have a qs if there s no Role as an attribute in the userEntity how can the controller know the path for exemple "/admin/dashbord" can only acced by the admin not user?

    • @cypcode
      @cypcode  11 місяців тому

      Hi @Zayedh8089 thank you very much for checking out the tutorial, I realised on the SecurityFilterChain I did not dive into RBAC but essentially what you want to have on the SecurityFilterChain Bean is define the roles for specific endpoints in your application that way when a user is logged in spring would know what privileges that user already has and they can access them. No role shouldn’t even be a consideration in real world application as you want every user to be created for a specific reason hence they MUST have a role

    • @cypcode
      @cypcode  11 місяців тому +1

      Hi @zayedh8089 please stay tuned I’ll be realising a tutorial for Spring Security JWT with RBAC later today so that you can get to see how to achieve what you’re asking for

    • @cypcode
      @cypcode  11 місяців тому +1

      Hi @zayedh8089 as promised please see tutorial for your issue:
      Spring Boot 3 + Spring Security + JWT Authentication and Authorisation | RBAC | Rest API Example
      ua-cam.com/video/AAQOv15lNkc/v-deo.html

    • @zayedh8089
      @zayedh8089 11 місяців тому

      i am grateful for your efforts thank you for your hard work@@cypcode

  • @PrinceKumar-fg7ix
    @PrinceKumar-fg7ix Рік тому

    hey i need this code !!!!

    • @cypcode
      @cypcode  Рік тому +2

      Hi @Prince thank you very much for watching, hope you like and subscribe as well as share video with other dev. Please see code as requested:
      github.com/cypcodestudios/springsecure
      Please do check us out as well if you're in need of code reviews

    • @PrinceKumar-fg7ix
      @PrinceKumar-fg7ix Рік тому

      @@cypcode i dont think its has the full code shown in yt