Save access token expires_in in the session cookie #45327
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR follows #45302 and is a 2nd preparation PR to address #32109.
In #45302 I've only restructured OIDC
DefaultTokenStateManager
to make it easier to understand how ID, access, and refresh tokens are concatenated before being encryped as a single session cookie or as individual cookies.The plan was, to follow #45302 with the introduction of JSON into
DefaultTokenStateManager
, to make it easier to manage more token properties. I've created a branch, see this commit. But after thinking about it, I decided to postpone it because:I then looked again at the code, and really, after #45302, it looked much easier to me just to add one more property, access token expires_in to the String. In fact, it is likely to be the last property we will add to the session cookie content.
So this PR only adds an access token expires_in property to the session cookie String payload, if it is available, or an empty string if not, and updates tests to confirm the access token expires_in property is available in the session cookie.
Next PR will have #32109 resolved.
@michalvavrik, @pedroigor FYI