[keycloak-user] Keycloak Rest API - sessions

Marek Posolda mposolda at redhat.com
Tue Jun 19 11:21:10 EDT 2018


I think you're right that usability can be improved. Could you please 
create JIRA for this?

Thanks,
Marek

On 18/06/18 15:44, Eivind Larsen wrote:
> Hi Keycloak Users!
>
> I am integrating the session data from Keycloak into our existing
> account settings page.
>
> I see Keycloak has an API call for listing user sessions.
>
> GET /admin/realms/{realm}/clients/{id}/user-sessions
>
> a) I was wondering why this does not include offline sessions?
>
> So to list all sessions I need to:
>
> 1. List user sessions (call above).
> 2. List consents.
> 3. Grab	client ids from consents.
> 4. List offlineSessions for each client in 3.
> 5. Merge all the session from 1 and 4.
>
> b) Am I missing something? Is there a simpler way to list all sessions
> for a user?
>
>
> Best regards,
> Eivind Larsen
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user




More information about the keycloak-user mailing list