ali-bouali / spring-boot-3-jwt-security

Sample project on how to implement JWT security based using Spring boot 3 and Spring security 6
https://aliboucoding.com/p/securing-your-spring-boot-3-0-applications-with-json-web-tokens-jwt
Apache License 2.0
1.86k stars 870 forks source link

Update UserService.java #57

Open bouchaalaOmar opened 1 year ago

bouchaalaOmar commented 1 year ago

Hi,

I think that It is better to use Authentication instead the Principal.

the Principal is a part of Java while the Authentication is a part of Spring.

So, I think that it is better to use the more high level of abstraction.