Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix offline sessions #21

Merged
merged 5 commits into from
Jun 9, 2021

Conversation

sailorgallifrey
Copy link

createOfflineSessionsImpl was not creating offline sessions, but rather was creating only active sessions. Instances of UserSessionModel and AuthenticatedClientSessionModel need to be converted to offline using createOfflineUserSession and createOfflineClientSession respectively. Tested and confirmed that offline sessions are now being created when this is deployed to our Keycloak instance.

@pedroigor
Copy link
Contributor

@sailorgallifrey Thanks. I think the original intent was to only persist sessions. Mainly for testing loading offline sessions during startup.

I guess you are also using these sessions to test authentication?

@sailorgallifrey
Copy link
Author

sailorgallifrey commented Jun 8, 2021

@pedroigor This is trying to match expected behavior. The behavior we experienced is that originally only active sessions were created. This change ensures that offline sessions are also being created and persisted.

We were using this to test the performance of loading offline sessions at startup. Let me know if you have further questions.

@pedroigor pedroigor merged commit 14a9637 into keycloak:main Jun 9, 2021
@pedroigor
Copy link
Contributor

pedroigor commented Jun 9, 2021

@sailorgallifrey Thanks. Going to prepare a release this week.

@sailorgallifrey sailorgallifrey deleted the fix_offline_sessions branch June 14, 2021 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants