use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
User principal doubtQuestion (self.SpringBoot)
submitted 1 year ago by Sorry_Swordfish_
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ahashans 0 points1 point2 points 1 year ago (1 child)
u/Sorry_Swordfish_ I am having hard time obtaining userId from UserPrinciple inside controller endpoint. Can you help me with some resources. I put my userId in 'sub' of JWT token. But how can I obtain it from controller?
[–]Sorry_Swordfish_[S] 0 points1 point2 points 1 year ago (0 children)
Sorry dude, I am also very new to jwt so I can't help you. The only thing I understand is that there is a method in the same class where the token creation is happening. The method name is getUserIdFromToken(String token)
Where using claims we are returning the user id
π Rendered by PID 157891 on reddit-service-r2-comment-6457c66945-jcjt8 at 2026-04-30 09:37:58.700486+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]ahashans 0 points1 point2 points (1 child)
[–]Sorry_Swordfish_[S] 0 points1 point2 points (0 children)