org.keycloak.models.sessions.infinispan

## Class AuthenticatedClientSessionAdapter

- java.lang.Object
- - org.keycloak.models.sessions.infinispan.AuthenticatedClientSessionAdapter

- All Implemented Interfaces:
    AuthenticatedClientSessionModel, CommonClientSessionModel

      public class AuthenticatedClientSessionAdapter
      extends Object
      implements AuthenticatedClientSessionModel

  Author:
    Marek Posolda

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.sessions.CommonClientSessionModel

      `CommonClientSessionModel.Action, CommonClientSessionModel.ExecutionStatus`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthenticatedClientSessionAdapter(KeycloakSession kcSession, InfinispanUserSessionProvider provider, AuthenticatedClientSessionEntity entity, ClientModel client, UserSessionModel userSession, InfinispanChangelogBasedTransaction<String,UserSessionEntity> userSessionUpdateTx, InfinispanChangelogBasedTransaction<UUID,AuthenticatedClientSessionEntity> clientSessionUpdateTx, boolean offline)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `detachFromUserSession()` Detaches the client session from its user session.
    `String` | `getAction()`
    `ClientModel` | `getClient()`
    `String` | `getCurrentRefreshToken()`
    `int` | `getCurrentRefreshTokenUseCount()`
    `String` | `getId()`
    `String` | `getNote(String name)`
    `Map<String,String>` | `getNotes()`
    `String` | `getProtocol()`
    `RealmModel` | `getRealm()`
    `String` | `getRedirectUri()`
    `int` | `getTimestamp()`
    `UserSessionModel` | `getUserSession()`
    `void` | `removeNote(String name)`
    `void` | `setAction(String action)`
    `void` | `setCurrentRefreshToken(String currentRefreshToken)`
    `void` | `setCurrentRefreshTokenUseCount(int currentRefreshTokenUseCount)`
    `void` | `setNote(String name, String value)`
    `void` | `setProtocol(String method)`
    `void` | `setRedirectUri(String uri)`
    `void` | `setTimestamp(int timestamp)`

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

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

- - ### Constructor Detail

    - #### AuthenticatedClientSessionAdapter

          public AuthenticatedClientSessionAdapter(KeycloakSession kcSession,
                                                   InfinispanUserSessionProvider provider,
                                                   AuthenticatedClientSessionEntity entity,
                                                   ClientModel client,
                                                   UserSessionModel userSession,
                                                   InfinispanChangelogBasedTransaction<String,UserSessionEntity> userSessionUpdateTx,
                                                   InfinispanChangelogBasedTransaction<UUID,AuthenticatedClientSessionEntity> clientSessionUpdateTx,
                                                   boolean offline)

  - ### Method Detail

    - #### detachFromUserSession

          public void detachFromUserSession()

      Detaches the client session from its user session.

      This method does not delete the client session from user session records, it only removes the client session. The list of client sessions within user session is updated lazily for performance reasons.

      Specified by:
        `detachFromUserSession` in interface `AuthenticatedClientSessionModel`

    - #### getUserSession

          public UserSessionModel getUserSession()

      Specified by:
        `getUserSession` in interface `AuthenticatedClientSessionModel`

    - #### getRedirectUri

          public String getRedirectUri()

      Specified by:
        `getRedirectUri` in interface `CommonClientSessionModel`

    - #### setRedirectUri

          public void setRedirectUri(String uri)

      Specified by:
        `setRedirectUri` in interface `CommonClientSessionModel`

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `AuthenticatedClientSessionModel`

    - #### getRealm

          public RealmModel getRealm()

      Specified by:
        `getRealm` in interface `CommonClientSessionModel`

    - #### getClient

          public ClientModel getClient()

      Specified by:
        `getClient` in interface `CommonClientSessionModel`

    - #### getTimestamp

          public int getTimestamp()

      Specified by:
        `getTimestamp` in interface `AuthenticatedClientSessionModel`

    - #### setTimestamp

          public void setTimestamp(int timestamp)

      Specified by:
        `setTimestamp` in interface `AuthenticatedClientSessionModel`

    - #### getCurrentRefreshTokenUseCount

          public int getCurrentRefreshTokenUseCount()

      Specified by:
        `getCurrentRefreshTokenUseCount` in interface `AuthenticatedClientSessionModel`

    - #### setCurrentRefreshTokenUseCount

          public void setCurrentRefreshTokenUseCount(int currentRefreshTokenUseCount)

      Specified by:
        `setCurrentRefreshTokenUseCount` in interface `AuthenticatedClientSessionModel`

    - #### getCurrentRefreshToken

          public String getCurrentRefreshToken()

      Specified by:
        `getCurrentRefreshToken` in interface `AuthenticatedClientSessionModel`

    - #### setCurrentRefreshToken

          public void setCurrentRefreshToken(String currentRefreshToken)

      Specified by:
        `setCurrentRefreshToken` in interface `AuthenticatedClientSessionModel`

    - #### getAction

          public String getAction()

      Specified by:
        `getAction` in interface `CommonClientSessionModel`

    - #### setAction

          public void setAction(String action)

      Specified by:
        `setAction` in interface `CommonClientSessionModel`

    - #### getProtocol

          public String getProtocol()

      Specified by:
        `getProtocol` in interface `CommonClientSessionModel`

    - #### setProtocol

          public void setProtocol(String method)

      Specified by:
        `setProtocol` in interface `CommonClientSessionModel`

    - #### getNote

          public String getNote(String name)

      Specified by:
        `getNote` in interface `AuthenticatedClientSessionModel`

    - #### setNote

          public void setNote(String name,
                              String value)

      Specified by:
        `setNote` in interface `AuthenticatedClientSessionModel`

    - #### removeNote

          public void removeNote(String name)

      Specified by:
        `removeNote` in interface `AuthenticatedClientSessionModel`

    - #### getNotes

          public Map<String,String> getNotes()

      Specified by:
        `getNotes` in interface `AuthenticatedClientSessionModel`

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