[keycloak-dev] Where to store data for the SSO session?

Stian Thorgersen stian at redhat.com
Mon Aug 31 04:30:34 EDT 2015


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 SPI.

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 at optile.net>
> To: keycloak-dev at lists.jboss.org
> Sent: Friday, 28 August, 2015 5:59:59 PM
> Subject: [keycloak-dev] Where to store data for the SSO session?
> 
> 
> 
> Hi,
> 
> 
> 
> 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
> usable.
> 
> 
> 
> 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?
> 
> 
> 
> Best regards,
> 
> 
> 
> Hermann Josef Hill
> Software Architect
> 
> optile GmbH
> Ganghoferstraße 39 | 80339 München
> Mobil +49 (151) 5385 0784
> 
> hermann.hill at optile.net | www.optile.net
> 
> USt.Id.-Nr. DE268847980
> 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
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev



More information about the keycloak-dev mailing list