org.keycloak.services.managers

## Class UserSessionManager

- java.lang.Object
- - org.keycloak.services.managers.UserSessionManager

-     public class UserSessionManager
      extends Object

  Author:
    Marek Posolda

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserSessionManager(KeycloakSession session)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createOrUpdateOfflineSession(AuthenticatedClientSessionModel clientSession, UserSessionModel userSession)`
    `Set<ClientModel>` | `findClientsWithOfflineToken(RealmModel realm, UserModel user)`
    `List<UserSessionModel>` | `findOfflineSessions(RealmModel realm, UserModel user)` Deprecated.
    `Stream<UserSessionModel>` | `findOfflineSessionsStream(RealmModel realm, UserModel user)`
    `UserSessionModel` | `findOfflineUserSession(RealmModel realm, String userSessionId)`
    `boolean` | `isOfflineTokenAllowed(ClientSessionContext clientSessionCtx)`
    `boolean` | `revokeOfflineToken(UserModel user, ClientModel client)`
    `void` | `revokeOfflineUserSession(UserSessionModel userSession)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UserSessionManager

          public UserSessionManager(KeycloakSession session)

  - ### Method Detail

    - #### createOrUpdateOfflineSession

          public void createOrUpdateOfflineSession(AuthenticatedClientSessionModel clientSession,
                                                   UserSessionModel userSession)

    - #### findOfflineUserSession

          public UserSessionModel findOfflineUserSession(RealmModel realm,
                                                         String userSessionId)

    - #### findClientsWithOfflineToken

          public Set<ClientModel> findClientsWithOfflineToken(RealmModel realm,
                                                              UserModel user)

    - #### findOfflineSessions

          @Deprecated
          public List<UserSessionModel> findOfflineSessions(RealmModel realm,
                                                                        UserModel user)

      Deprecated.

    - #### findOfflineSessionsStream

          public Stream<UserSessionModel> findOfflineSessionsStream(RealmModel realm,
                                                                    UserModel user)

    - #### revokeOfflineToken

          public boolean revokeOfflineToken(UserModel user,
                                            ClientModel client)

    - #### revokeOfflineUserSession

          public void revokeOfflineUserSession(UserSessionModel userSession)

    - #### isOfflineTokenAllowed

          public boolean isOfflineTokenAllowed(ClientSessionContext clientSessionCtx)

Copyright © 2020 JBoss by Red Hat. All rights reserved.