Use SessionExpirationUtils for validate user and client sessions. Check client session is valid in TokenManager. #29013
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.
Closes #24936
This PR checks the client session in the token manager to not manage a expired client session that generates negative values. Besides I have also unified the
AuthenticationManager.isSessionValid
to also useSessionExpirationUtils
calculations. I'm sending a draft because of the last change. This is modifying some tests because previously theisSessionValid
used just the remember-me values when the session was remember-me. Now it uses teh max value between the remember-me value and the normal sso value (asSessionExpirationUtils
does). I think we should add a little upgrade note if we decide to continue this way. There are other two options: continue doing the calculation like before; change calculation inSessionExpirationUtils
to use one or the other value. I prefer this way.@mposolda @douglaspalmer Can you please test and review if you see something wrong?