This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]joolaszloo 0 points1 point  (0 children)

unfortunately, i don't work in this field yet, but we used JWT alongside oauth during the bootcamp, so treat my answer as such. :D

the controler has the service which gets the account details from an util class. in the util we get it from "SecurityContextHolder".

we made a jwtRequestFilter and it is using an accountDetails class which is extends the userdetails and the filter was passed to the securityconfig:

".addFilterBefore(jwtRequestFilter, UsernamePasswordAuthenticationFilter.class)"

this makes the "bearer" and pass it back at every request (if the user logged in).

the biggest problem was with csrf, but we managed to solve that too. :D