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
Constructors Constructor Description InfinispanStickySessionEncoderProvider(KeycloakSession session, boolean shouldAttachRoute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
String
decodeSessionId(String encodedSessionId)
String
encodeSessionId(String sessionId)
boolean
shouldAttachRoute()
-
-
-
Constructor Detail
-
InfinispanStickySessionEncoderProvider
public InfinispanStickySessionEncoderProvider(KeycloakSession session, boolean shouldAttachRoute)
-
-
Method Detail
-
encodeSessionId
public String encodeSessionId(String sessionId)
- Specified by:
encodeSessionId
in interfaceStickySessionEncoderProvider
- Returns:
- Encoded value to be used as the value of sticky session cookie (AUTH_SESSION_ID cookie)
-
decodeSessionId
public String decodeSessionId(String encodedSessionId)
- 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.
-
-