Search in sources :

Example 1 with RunOnServer

use of org.keycloak.testsuite.runonserver.RunOnServer in project keycloak by keycloak.

the class BrokerRunOnServerUtil method removeBrokerExpiredSessions.

static RunOnServer removeBrokerExpiredSessions() {
    return (RunOnServer) session -> {
        RealmModel realm = session.getContext().getRealm();
        session.sessions().removeExpired(realm);
        session.authenticationSessions().removeExpired(realm);
    };
}
Also used : RealmModel(org.keycloak.models.RealmModel) RunOnServer(org.keycloak.testsuite.runonserver.RunOnServer)

Aggregations

RealmModel (org.keycloak.models.RealmModel)1 RunOnServer (org.keycloak.testsuite.runonserver.RunOnServer)1