Class UserSessionPredicate
java.lang.Object
org.keycloak.models.sessions.infinispan.stream.UserSessionPredicate
- All Implemented Interfaces:
Predicate<Map.Entry<String,
SessionEntityWrapper<UserSessionEntity>>>
@SerializeWith(ExternalizerImpl.class)
public class UserSessionPredicate
extends Object
implements Predicate<Map.Entry<String,SessionEntityWrapper<UserSessionEntity>>>
- Author:
- Stian Thorgersen
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbrokerUserId
(String id) Adds a test for client.static UserSessionPredicate
Creates a user session predicate.expired
(Integer expired, Integer expiredRefresh, Integer expiredRememberMe, Integer expiredRefreshRememberMe) Returns the user id.boolean
Predicate<? super UserSessionModel>
-
Method Details
-
create
Creates a user session predicate. If using theclient(java.lang.String)
method, see its warning.- Parameters:
realm
-- Returns:
-
user
-
client
Adds a test for client. Note that this test can return stale sessions because on detaching client session from user session, only client session is deleted and user session is not updated for performance reason.- Parameters:
clientUUID
-- Returns:
- See Also:
-
expired
-
expired
public UserSessionPredicate expired(Integer expired, Integer expiredRefresh, Integer expiredRememberMe, Integer expiredRefreshRememberMe) -
brokerSessionId
-
brokerUserId
-
getUserId
Returns the user id.- Returns:
-
getBrokerSessionId
-
getBrokerUserId
-
test
- Specified by:
test
in interfacePredicate<Map.Entry<String,
SessionEntityWrapper<UserSessionEntity>>>
-
getClient
-
toModelPredicate
-