Hello my question is typed up on stackoverflow. If you have any ideas the help would be much appreciated :))
#How to set the principal name of a Spring Security OAuth2AuthorizedClient using the Token Response
8 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @mortal osprey! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
What is principal name? And why do you need this?
The principal name is the identifier of the OAuth2AuthorizedClient. Essentially, how does this session belong to. I need it because my OAuth2 provider does not the standard name in the access_token return, instead he provides a membership_id (which I can use, but have to properly assign to the AuthorizedClient)
If you are using JWT token, you can add expire date in token payload. And it will not change.
Your token is basic token, if you want to track the session, you should add time and token to database or cache
And you need to check before every request