Package org.keycloak.utils
Class KeycloakSessionUtil
java.lang.Object
org.keycloak.utils.KeycloakSessionUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeycloakSessionGet theKeycloakSessioncurrently associated with the thread.static StringgetRealmNameFromContext(KeycloakSession session) static KeycloakSessionsetKeycloakSession(KeycloakSession session) Associate theKeycloakSessionwith the current thread.
-
Method Details
-
getKeycloakSession
Get theKeycloakSessioncurrently associated with the thread.- Returns:
- the current session
-
setKeycloakSession
Associate theKeycloakSessionwith the current thread.
Warning: should not be called directly. Keycloak will manage this.- Parameters:
session-- Returns:
- the existing
KeycloakSessionor null
-
getRealmNameFromContext
-