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
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
Nice!
Awesome we actually doing this now at uni here in Cape Town, link us with a git repo please?
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
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.
Hi @capybara1721 thank you for watching and it’s always a pleasure, you can also check me out if you need code reviews
spring documentation SUCKS af
true bro spring documentation sucks@@Mazzhot
Thank you for this tutorial.
Please can you share the repo with me, thanks
Very nice video, but im really having hard time trying to connect all that to the front-end...
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
@@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
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?
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
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
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
i am grateful for your efforts thank you for your hard work@@cypcode
hey i need this code !!!!
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
@@cypcode i dont think its has the full code shown in yt