org.keycloak.models

## Interface UserSessionProvider

- All Superinterfaces:
    Provider
  All Known Implementing Classes:
    InfinispanUserSessionProvider

      public interface UserSessionProvider
      extends Provider

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `UserLoginFailureModel` | `addUserLoginFailure(RealmModel realm, String userId)`
    `void` | `close()`
    `ClientInitialAccessModel` | `createClientInitialAccessModel(RealmModel realm, int expiration, int count)`
    `ClientSessionModel` | `createClientSession(RealmModel realm, ClientModel client)`
    `ClientSessionModel` | `createOfflineClientSession(ClientSessionModel clientSession)`
    `UserSessionModel` | `createOfflineUserSession(UserSessionModel userSession)`
    `UserSessionModel` | `createUserSession(RealmModel realm, UserModel user, String loginUsername, String ipAddress, String authMethod, boolean rememberMe, String brokerSessionId, String brokerUserId)`
    `long` | `getActiveUserSessions(RealmModel realm, ClientModel client)`
    `ClientInitialAccessModel` | `getClientInitialAccessModel(RealmModel realm, String id)`
    `ClientSessionModel` | `getClientSession(RealmModel realm, String id)`
    `ClientSessionModel` | `getClientSession(String id)`
    `ClientSessionModel` | `getOfflineClientSession(RealmModel realm, String clientSessionId)`
    `List<ClientSessionModel>` | `getOfflineClientSessions(RealmModel realm, UserModel user)`
    `long` | `getOfflineSessionsCount(RealmModel realm, ClientModel client)`
    `UserSessionModel` | `getOfflineUserSession(RealmModel realm, String userSessionId)`
    `List<UserSessionModel>` | `getOfflineUserSessions(RealmModel realm, ClientModel client, int first, int max)`
    `UserLoginFailureModel` | `getUserLoginFailure(RealmModel realm, String userId)`
    `UserSessionModel` | `getUserSession(RealmModel realm, String id)`
    `UserSessionModel` | `getUserSessionByBrokerSessionId(RealmModel realm, String brokerSessionId)`
    `List<UserSessionModel>` | `getUserSessionByBrokerUserId(RealmModel realm, String brokerUserId)`
    `List<UserSessionModel>` | `getUserSessions(RealmModel realm, ClientModel client)`
    `List<UserSessionModel>` | `getUserSessions(RealmModel realm, ClientModel client, int firstResult, int maxResults)`
    `List<UserSessionModel>` | `getUserSessions(RealmModel realm, UserModel user)`
    `ClientSessionModel` | `importClientSession(ClientSessionModel persistentClientSession, boolean offline)`
    `UserSessionModel` | `importUserSession(UserSessionModel persistentUserSession, boolean offline)`
    `List<ClientInitialAccessModel>` | `listClientInitialAccess(RealmModel realm)`
    `void` | `onClientRemoved(RealmModel realm, ClientModel client)`
    `void` | `onRealmRemoved(RealmModel realm)`
    `void` | `onUserRemoved(RealmModel realm, UserModel user)`
    `void` | `removeAllUserLoginFailures(RealmModel realm)`
    `void` | `removeClientInitialAccessModel(RealmModel realm, String id)`
    `void` | `removeClientSession(RealmModel realm, ClientSessionModel clientSession)`
    `void` | `removeExpired(RealmModel realm)`
    `void` | `removeOfflineClientSession(RealmModel realm, String clientSessionId)`
    `void` | `removeOfflineUserSession(RealmModel realm, UserSessionModel userSession)`
    `void` | `removeUserLoginFailure(RealmModel realm, String userId)`
    `void` | `removeUserSession(RealmModel realm, UserSessionModel session)`
    `void` | `removeUserSessions(RealmModel realm)`
    `void` | `removeUserSessions(RealmModel realm, UserModel user)`

- - ### Method Detail

    - #### createClientSession

          ClientSessionModel createClientSession(RealmModel realm,
                                                 ClientModel client)

    - #### getClientSession

          ClientSessionModel getClientSession(RealmModel realm,
                                              String id)

    - #### getClientSession

          ClientSessionModel getClientSession(String id)

    - #### createUserSession

          UserSessionModel createUserSession(RealmModel realm,
                                             UserModel user,
                                             String loginUsername,
                                             String ipAddress,
                                             String authMethod,
                                             boolean rememberMe,
                                             String brokerSessionId,
                                             String brokerUserId)

    - #### getUserSession

          UserSessionModel getUserSession(RealmModel realm,
                                          String id)

    - #### getUserSessions

          List<UserSessionModel> getUserSessions(RealmModel realm,
                                                 UserModel user)

    - #### getUserSessions

          List<UserSessionModel> getUserSessions(RealmModel realm,
                                                 ClientModel client)

    - #### getUserSessions

          List<UserSessionModel> getUserSessions(RealmModel realm,
                                                 ClientModel client,
                                                 int firstResult,
                                                 int maxResults)

    - #### getUserSessionByBrokerUserId

          List<UserSessionModel> getUserSessionByBrokerUserId(RealmModel realm,
                                                              String brokerUserId)

    - #### getUserSessionByBrokerSessionId

          UserSessionModel getUserSessionByBrokerSessionId(RealmModel realm,
                                                           String brokerSessionId)

    - #### getActiveUserSessions

          long getActiveUserSessions(RealmModel realm,
                                     ClientModel client)

    - #### removeUserSession

          void removeUserSession(RealmModel realm,
                                 UserSessionModel session)

    - #### removeUserSessions

          void removeUserSessions(RealmModel realm,
                                  UserModel user)

    - #### removeExpired

          void removeExpired(RealmModel realm)

    - #### removeUserSessions

          void removeUserSessions(RealmModel realm)

    - #### removeClientSession

          void removeClientSession(RealmModel realm,
                                   ClientSessionModel clientSession)

    - #### getUserLoginFailure

          UserLoginFailureModel getUserLoginFailure(RealmModel realm,
                                                    String userId)

    - #### addUserLoginFailure

          UserLoginFailureModel addUserLoginFailure(RealmModel realm,
                                                    String userId)

    - #### removeUserLoginFailure

          void removeUserLoginFailure(RealmModel realm,
                                      String userId)

    - #### removeAllUserLoginFailures

          void removeAllUserLoginFailures(RealmModel realm)

    - #### onRealmRemoved

          void onRealmRemoved(RealmModel realm)

    - #### onClientRemoved

          void onClientRemoved(RealmModel realm,
                               ClientModel client)

    - #### onUserRemoved

          void onUserRemoved(RealmModel realm,
                             UserModel user)

    - #### createOfflineUserSession

          UserSessionModel createOfflineUserSession(UserSessionModel userSession)

    - #### getOfflineUserSession

          UserSessionModel getOfflineUserSession(RealmModel realm,
                                                 String userSessionId)

    - #### removeOfflineUserSession

          void removeOfflineUserSession(RealmModel realm,
                                        UserSessionModel userSession)

    - #### createOfflineClientSession

          ClientSessionModel createOfflineClientSession(ClientSessionModel clientSession)

    - #### getOfflineClientSession

          ClientSessionModel getOfflineClientSession(RealmModel realm,
                                                     String clientSessionId)

    - #### getOfflineClientSessions

          List<ClientSessionModel> getOfflineClientSessions(RealmModel realm,
                                                            UserModel user)

    - #### removeOfflineClientSession

          void removeOfflineClientSession(RealmModel realm,
                                          String clientSessionId)

    - #### getOfflineSessionsCount

          long getOfflineSessionsCount(RealmModel realm,
                                       ClientModel client)

    - #### getOfflineUserSessions

          List<UserSessionModel> getOfflineUserSessions(RealmModel realm,
                                                        ClientModel client,
                                                        int first,
                                                        int max)

    - #### importUserSession

          UserSessionModel importUserSession(UserSessionModel persistentUserSession,
                                             boolean offline)

    - #### importClientSession

          ClientSessionModel importClientSession(ClientSessionModel persistentClientSession,
                                                 boolean offline)

    - #### createClientInitialAccessModel

          ClientInitialAccessModel createClientInitialAccessModel(RealmModel realm,
                                                                  int expiration,
                                                                  int count)

    - #### getClientInitialAccessModel

          ClientInitialAccessModel getClientInitialAccessModel(RealmModel realm,
                                                               String id)

    - #### removeClientInitialAccessModel

          void removeClientInitialAccessModel(RealmModel realm,
                                              String id)

    - #### listClientInitialAccess

          List<ClientInitialAccessModel> listClientInitialAccess(RealmModel realm)

    - #### close

          void close()

      Specified by:
        `close` in interface `Provider`

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