KeycloakSession is not a users session it's created/closed per-request to the server.
We recently added an Authentication SPI in 1.4 and in 1.5 we're including a way to
define custom flows. This may be better suited to your needs than the User Federation
With regards to the user session there's a user session provider that's
responsible for that, and you can add attributes to the user session. You can get the user
session provider from KeycloakSession.sessions(). How you get the user-session or the user
session id depends on where exactly you want to obtain it.
----- Original Message -----
From: "Hermann Hill" <hermann.hill(a)optile.net>
Sent: Friday, 28 August, 2015 5:59:59 PM
Subject: [keycloak-dev] Where to store data for the SSO session?
I’m currently working on attaching an internal authentication API to Keycloak
by implementing an UserFederationProvider.
Basically it is working, but I’m wondering where I’m supposed to store
additional data that should be tied to the lifetime of the SSO session of an
user. The KeycloakSession object seems to be recreated on every access to
the server and I got lost in its subobjects without finding something
Is there any documentation on the recommended way to do that? If not, could
somebody please be so kind and point me in the right direction?
Hermann Josef Hill
Ganghoferstraße 39 | 80339 München
Mobil +49 (151) 5385 0784
hermann.hill(a)optile.net | www.optile.net
Geschäftsführer: Daniel Smeds
Handelsregister München HRB 183178
+++ Besuchen Sie uns auf der dmexco 2015 am 16. & 17. September, Köln, Halle
7.1 Stand F013 +++
keycloak-dev mailing list