DEV Community 👩‍💻👨‍💻

Discussion on: Spring Security with JWT

devc0n profile image
Ricardo Jobse • Edited on

For starters, great introduction to JWT security! But i was looking around to see if i could authenticate users with a database instead of the in memory database that is used by default. Do you happen to have an example for this?

Few minutes after i asked the question i stumbled upon the answer...

for those interested i changed this:


to this


password encoder is just a constructor for a BcryptEncoder, and the userdetail service provides a method to load by username from the repository, and get authorities.