Class InfinispanStickySessionEncoderProvider
java.lang.Object
org.keycloak.models.sessions.infinispan.InfinispanStickySessionEncoderProvider
- All Implemented Interfaces:
Provider
,StickySessionEncoderProvider
public class InfinispanStickySessionEncoderProvider
extends Object
implements StickySessionEncoderProvider
- Author:
- Marek Posolda
-
Constructor Summary
ConstructorDescriptionInfinispanStickySessionEncoderProvider
(KeycloakSession session, boolean shouldAttachRoute) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
decodeSessionId
(String encodedSessionId) encodeSessionId
(String sessionId) boolean
-
Constructor Details
-
InfinispanStickySessionEncoderProvider
-
-
Method Details
-
encodeSessionId
- Specified by:
encodeSessionId
in interfaceStickySessionEncoderProvider
- Returns:
- Encoded value to be used as the value of sticky session cookie (AUTH_SESSION_ID cookie)
-
decodeSessionId
- Specified by:
decodeSessionId
in interfaceStickySessionEncoderProvider
- Parameters:
encodedSessionId
- value of the sticky session cookie- Returns:
- decoded value, which represents the actual ID of the
AuthenticationSessionModel
-
shouldAttachRoute
public boolean shouldAttachRoute()- Specified by:
shouldAttachRoute
in interfaceStickySessionEncoderProvider
- Returns:
- true if information about route should be attached to the sticky session cookie by Keycloak. Otherwise it may be attached by loadbalancer.
-
close
public void close()
-