Course

Spring Security JWT

Master JWT implementation in Spring Security to build secure, scalable APIs for mobile apps, SPAs, and microservices - the way production systems actually work.

of video
2.9 h
lectures
47
sections
6

Want a mentor as well? The Academy gives you every course on Amigoscode plus code reviews, daily live calls and interview prep, for $129/month. Compare →

“Amigoscode does a pretty darned good job, and consistently too, covering Spring, and for that I'm very appreciative.”
Josh Long · Spring Developer Advocate

What you'll learn

By the end of this course

  • JWT Fundamentals - Understand token structure, claims, signing algorithms, and the stateless authentication model that powers modern APIs.
  • Spring Security JWT Integration - Configure JWT filters, token generation, validation, and integrate with Spring Security's authentication flow.
  • Token Lifecycle Management - Implement token refresh, blacklisting, expiration handling, and secure token storage strategies for production.
  • Stateless API Security - Build REST APIs that authenticate mobile apps, SPAs, and microservices without server-side sessions or cookies.
  • Advanced JWT Patterns - Handle token rotation, multi-tenant JWT claims, and integrate JWT with OAuth2/OIDC for hybrid authentication flows.
  • Production Hardening - Secure token transmission, handle CORS for JWT APIs, implement rate limiting, and monitor token abuse patterns.

Curriculum

6 sections, 47 lectures

2.9 h of video. Open any section to see its lectures.

1Prerequisites1 min
  1. 1Recommended CoursesFree preview
  2. 2Cloning Repo
2JSON Web Token52 min
  1. 1Section Start
  2. 2Intro to JWT10 min
  3. 3JWT Fundamentals Quiz
  4. 4Installing Dependency8 min
  5. 5Enable Resource Server4 min
  6. 6Encoding And Decoding With Secret Key4 min
  7. 7JWT Token Service8 min
  8. 8JWT Decoder4 min
  9. 9Inspecting Token1 min
  10. 10AuthController4 min
  11. 11JWT In Action10 min
3JWT Authorities30 min
  1. 1Adding Roles And Permissions When Token Is Issued9 min
  2. 2JWT Auth Converter P15 min
  3. 3JWT Auth Converter P210 min
  4. 4Outro6 min
  5. 5JWT Authorities Quiz
  6. 6Section End
4Refresh tokens1 h 5 min
  1. 1Section Start
  2. 2How Refresh Tokens Work3 min
  3. 3Exercise3 min
  4. 4How To Store Tokens4 min
  5. 5A Better Way to Create and Store Refresh Tokens
  6. 6Section Recap2 min
  7. 7Refresh Tokens Quiz
  8. 8Section End
  9. 9Refreshtoken Entity7 min
  10. 10Refreshtoken Repository And Service4 min
  11. 11Send Refresh Token On Login6 min
  12. 12Rotate And Get New Refresh Token8 min
  13. 13Test Rotate Token Method5 min
  14. 14Refactor8 min
  15. 15Roles To Granted Authorities7 min
  16. 16Testing Refresh Tokens7 min
5Refresh tokens & cookies30 min
  1. 1Section Start
  2. 2How To Store Tokens5 min
  3. 3WebAuthController2 min
  4. 4Cookies9 min
  5. 5Rotate Refresh Tokens5 min
  6. 6Logout7 min
  7. 7Outro1 min
  8. 8Refresh Tokens & Cookies Quiz
  9. 9Section End
6Outro1 min
  1. 1What's Coming Next
  2. 2Feedback
  3. 3Next and Recommended Courses

Choose how you learn

Learn on your own, or with people who check your work

The course is yours to keep. The Academy is this course and every other one, plus the people who get you hired.

Spring Security JWT

The course, on your own

  • 47 lectures, 2.9 h of video
  • Source code for everything you build
  • Subtitles on every video
  • 6 months of IntelliJ IDEA Ultimate
  • Lifetime access to the course and its updates
Recommended

The Academy

The courses, plus the people

$129/monthcancel anytime

This course, plus

  • Every course on Amigoscode 50+ in the Zero to Hired Roadmap
  • Daily live calls and 1:1 instructor time
  • Code reviews and pair programming on what you build
  • Interview prep mock interviews, System Design Lab, CV and LinkedIn review
  • Land an interview in 90 days or we coach you 1:1 free until you do.
Join the Academy

7-day money-back guarantee · Secure checkout on Skool

“Nelson was teaching 90% of my job. I was already implementing everything I learnt from it.”
MBMarlon BragaJava Full Stack Software Developer
“I was a totally different person. More confident as a developer, more prepared for my job.”
GabrielaSoftware Engineer at Mercado Livre
“I studied biomedicine and psychology. I found Nelson's Java tutorials while looking for a course for my brother. I was hooked and now here I am, a software engineer at IKEA.”
NajmaSoftware Engineer at IKEA

Read every review →

About this course

Who is this course for?

Level: Intermediate to Advanced Engineers. Watch the free preview lectures in the curriculum to see if it's right for you.

How long will it take?

There are about 3 hours of video. Most people finish in a week at 5 hours a week, plus the time you spend building along.

Can I buy this course on its own?

No. It's part of the Full Stack Professional with AI bundle, which includes it and the courses around it.

Should I buy the course or join the Academy?

Buy the course if you only want this topic and you learn well on your own. Join the Academy if you want to get hired or move up: you get every course on Amigoscode, this one included, plus daily live calls, code reviews and interview prep, for $129/month.