org.keycloak.services

## Class DefaultKeycloakContext

- java.lang.Object
- - org.keycloak.services.DefaultKeycloakContext

- All Implemented Interfaces:
    KeycloakContext

      public class DefaultKeycloakContext
      extends Object
      implements KeycloakContext

  Author:
    Stian Thorgersen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultKeycloakContext(KeycloakSession session)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `URI` | `getAuthServerUrl()`
    `ClientModel` | `getClient()`
    `ClientConnection` | `getConnection()`
    `<T> T` | `getContextObject(Class<T> clazz)`
    `String` | `getContextPath()`
    `RealmModel` | `getRealm()`
    `RealmImporter` | `getRealmManager()`
    `javax.ws.rs.core.HttpHeaders` | `getRequestHeaders()`
    `javax.ws.rs.core.UriInfo` | `getUri()`
    `Locale` | `resolveLocale(UserModel user)`
    `void` | `setClient(ClientModel client)`
    `void` | `setConnection(ClientConnection connection)`
    `void` | `setRealm(RealmModel realm)`

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

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

- - ### Constructor Detail

    - #### DefaultKeycloakContext

          public DefaultKeycloakContext(KeycloakSession session)

  - ### Method Detail

    - #### getAuthServerUrl

          public URI getAuthServerUrl()

      Specified by:
        `getAuthServerUrl` in interface `KeycloakContext`

    - #### getContextPath

          public String getContextPath()

      Specified by:
        `getContextPath` in interface `KeycloakContext`

    - #### getUri

          public javax.ws.rs.core.UriInfo getUri()

      Specified by:
        `getUri` in interface `KeycloakContext`

    - #### getRequestHeaders

          public javax.ws.rs.core.HttpHeaders getRequestHeaders()

      Specified by:
        `getRequestHeaders` in interface `KeycloakContext`

    - #### getContextObject

          public <T> T getContextObject(Class<T> clazz)

      Specified by:
        `getContextObject` in interface `KeycloakContext`

    - #### getRealm

          public RealmModel getRealm()

      Specified by:
        `getRealm` in interface `KeycloakContext`

    - #### setRealm

          public void setRealm(RealmModel realm)

      Specified by:
        `setRealm` in interface `KeycloakContext`

    - #### getClient

          public ClientModel getClient()

      Specified by:
        `getClient` in interface `KeycloakContext`

    - #### setClient

          public void setClient(ClientModel client)

      Specified by:
        `setClient` in interface `KeycloakContext`

    - #### getConnection

          public ClientConnection getConnection()

      Specified by:
        `getConnection` in interface `KeycloakContext`

    - #### setConnection

          public void setConnection(ClientConnection connection)

      Specified by:
        `setConnection` in interface `KeycloakContext`

    - #### getRealmManager

          public RealmImporter getRealmManager()

      Specified by:
        `getRealmManager` in interface `KeycloakContext`

    - #### resolveLocale

          public Locale resolveLocale(UserModel user)

      Specified by:
        `resolveLocale` in interface `KeycloakContext`

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