Introduce a new session entity and store the session identifier in the tokens - #2520
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Contributes to #2175.
This PR introduces a new session entity and with all the usual artifacts (manager, store, cache). As mentioned in #2175, that new entity will serve as a way to identify a specific "connection" between a client application and an authorization server for a given user session. Its most main property,
LoginId, represents the identifier of the user login/session and can be set to any arbitrary value (even if a random 128/256-bit value is probably the best and simplest option).Note: this PR doesn't add backchannel logout support - that will be added later via a dedicated PR - but it updates the ASP.NET 4.8 and ASP.NET Core 10 samples to generate persist a 256-bit login ID per authentication in the authentication cookies (while making sure the same value is preserved when the authentication cookie/ticket is renewed).