org.keycloak.models

## Interface ClientSessionContext

- All Known Implementing Classes:
    DefaultClientSessionContext

      public interface ClientSessionContext

  Request-scoped context object
  Author:
    Marek Posolda

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `getAttribute(String attribute, Class<T> clazz)`
    `Set<String>` | `getClientScopeIds()`
    `default Set<ClientScopeModel>` | `getClientScopes()` Deprecated. Use `getClientScopesStream` instead.
    `Stream<ClientScopeModel>` | `getClientScopesStream()` Returns client scopes as a stream.
    `AuthenticatedClientSessionModel` | `getClientSession()`
    `default Set<ProtocolMapperModel>` | `getProtocolMappers()` Deprecated. Use `getProtocolMappersStream` instead.
    `Stream<ProtocolMapperModel>` | `getProtocolMappersStream()` Returns protocol mappers as a stream.
    `default Set<RoleModel>` | `getRoles()` Deprecated. Use `getRolesStream` instead.
    `Stream<RoleModel>` | `getRolesStream()` Returns all roles including composite ones as a stream.
    `String` | `getScopeString()`
    `void` | `setAttribute(String name, Object value)`

- - ### Method Detail

    - #### getClientSession

          AuthenticatedClientSessionModel getClientSession()

    - #### getClientScopeIds

          Set<String> getClientScopeIds()

    - #### getClientScopes

          @Deprecated
          default Set<ClientScopeModel> getClientScopes()

      Deprecated. Use `getClientScopesStream` instead.
      Returns:
        Set of protocol mappers

    - #### getClientScopesStream

          Stream<ClientScopeModel> getClientScopesStream()

      Returns client scopes as a stream.
      Returns:
        Stream of client scopes. Never returns `null`.

    - #### getRoles

          @Deprecated
          default Set<RoleModel> getRoles()

      Deprecated. Use `getRolesStream` instead.
      Returns:
        expanded roles (composite roles already applied)

    - #### getRolesStream

          Stream<RoleModel> getRolesStream()

      Returns all roles including composite ones as a stream.
      Returns:
        Stream of `RoleModel`. Never returns `null`.

    - #### getProtocolMappers

          @Deprecated
          default Set<ProtocolMapperModel> getProtocolMappers()

      Deprecated. Use `getProtocolMappersStream` instead.
      Returns:
        Set of protocol mappers

    - #### getProtocolMappersStream

          Stream<ProtocolMapperModel> getProtocolMappersStream()

      Returns protocol mappers as a stream.
      Returns:
        Stream of protocol mappers. Never returns `null`.

    - #### getScopeString

          String getScopeString()

    - #### setAttribute

          void setAttribute(String name,
                            Object value)

    - #### getAttribute

          <T> T getAttribute(String attribute,
                             Class<T> clazz)

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