org.keycloak.models.sessions.mongo

## Class ClientSessionAdapter

- java.lang.Object
- - org.keycloak.models.sessions.mongo.AbstractMongoAdapter<MongoClientSessionEntity>
  - - org.keycloak.models.sessions.mongo.ClientSessionAdapter

- All Implemented Interfaces:
    ClientSessionModel

      public class ClientSessionAdapter
      extends AbstractMongoAdapter<MongoClientSessionEntity>
      implements ClientSessionModel

  Author:
    Stian Thorgersen

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.ClientSessionModel

      `ClientSessionModel.Action`

  - ### Field Summary

    - ### Fields inherited from class org.keycloak.models.sessions.mongo.AbstractMongoAdapter

      `invocationContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientSessionAdapter(KeycloakSession session, MongoUserSessionProvider provider, RealmModel realm, MongoClientSessionEntity entity, MongoStoreInvocationContext invContext)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClientSessionModel.Action` | `getAction()`
    `String` | `getAuthMethod()` Authentication request type, i.e.
    `ClientModel` | `getClient()`
    `String` | `getId()`
    `protected MongoClientSessionEntity` | `getMongoEntity()`
    `String` | `getNote(String name)`
    `RealmModel` | `getRealm()`
    `String` | `getRedirectUri()`
    `Set<String>` | `getRoles()`
    `int` | `getTimestamp()`
    `UserSessionModel` | `getUserSession()`
    `void` | `removeNote(String name)`
    `void` | `setAction(ClientSessionModel.Action action)`
    `void` | `setAuthMethod(String method)`
    `void` | `setNote(String name, String value)`
    `void` | `setRedirectUri(String uri)`
    `void` | `setRoles(Set<String> roles)`
    `void` | `setTimestamp(int timestamp)`
    `void` | `setUserSession(UserSessionModel userSession)`

    - ### Methods inherited from class org.keycloak.models.sessions.mongo.AbstractMongoAdapter

      `equals, getMongoStore, hashCode, updateMongoEntity`

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

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

- - ### Constructor Detail

    - #### ClientSessionAdapter

          public ClientSessionAdapter(KeycloakSession session,
                              MongoUserSessionProvider provider,
                              RealmModel realm,
                              MongoClientSessionEntity entity,
                              MongoStoreInvocationContext invContext)

  - ### Method Detail

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `ClientSessionModel`

    - #### getRealm

          public RealmModel getRealm()

      Specified by:
        `getRealm` in interface `ClientSessionModel`

    - #### getClient

          public ClientModel getClient()

      Specified by:
        `getClient` in interface `ClientSessionModel`

    - #### getUserSession

          public UserSessionModel getUserSession()

      Specified by:
        `getUserSession` in interface `ClientSessionModel`

    - #### setUserSession

          public void setUserSession(UserSessionModel userSession)

      Specified by:
        `setUserSession` in interface `ClientSessionModel`

    - #### setRedirectUri

          public void setRedirectUri(String uri)

      Specified by:
        `setRedirectUri` in interface `ClientSessionModel`

    - #### setRoles

          public void setRoles(Set<String> roles)

      Specified by:
        `setRoles` in interface `ClientSessionModel`

    - #### getRedirectUri

          public String getRedirectUri()

      Specified by:
        `getRedirectUri` in interface `ClientSessionModel`

    - #### getTimestamp

          public int getTimestamp()

      Specified by:
        `getTimestamp` in interface `ClientSessionModel`

    - #### setTimestamp

          public void setTimestamp(int timestamp)

      Specified by:
        `setTimestamp` in interface `ClientSessionModel`

    - #### getAction

          public ClientSessionModel.Action getAction()

      Specified by:
        `getAction` in interface `ClientSessionModel`

    - #### setAction

          public void setAction(ClientSessionModel.Action action)

      Specified by:
        `setAction` in interface `ClientSessionModel`

    - #### getRoles

          public Set<String> getRoles()

      Specified by:
        `getRoles` in interface `ClientSessionModel`

    - #### getNote

          public String getNote(String name)

      Specified by:
        `getNote` in interface `ClientSessionModel`

    - #### setNote

          public void setNote(String name,
                     String value)

      Specified by:
        `setNote` in interface `ClientSessionModel`

    - #### removeNote

          public void removeNote(String name)

      Specified by:
        `removeNote` in interface `ClientSessionModel`

    - #### getAuthMethod

          public String getAuthMethod()

      Description copied from interface: `ClientSessionModel`
      Authentication request type, i.e. OAUTH, SAML 2.0, SAML 1.1, etc.
      Specified by:
        `getAuthMethod` in interface `ClientSessionModel`
      Returns:

    - #### setAuthMethod

          public void setAuthMethod(String method)

      Specified by:
        `setAuthMethod` in interface `ClientSessionModel`

    - #### getMongoEntity

          protected MongoClientSessionEntity getMongoEntity()

      Specified by:
        `getMongoEntity` in class `AbstractMongoAdapter<MongoClientSessionEntity>`

Copyright © 2014. All Rights Reserved.