use of org.keycloak.models.ModelIllegalStateException in project keycloak by keycloak.
the class ResourceAdminManager method logoutAll.
// Methods for logout all
public GlobalRequestResult logoutAll(RealmModel realm) {
realm.setNotBefore(Time.currentTime());
GlobalRequestResult finalResult = new GlobalRequestResult();
AtomicInteger counter = new AtomicInteger(0);
realm.getClientsStream().forEach(c -> {
try {
counter.getAndIncrement();
GlobalRequestResult currentResult = logoutClient(realm, c, realm.getNotBefore());
finalResult.addAll(currentResult);
} catch (ModelIllegalStateException ex) {
// currently, GlobalRequestResult doesn't allow for information about clients that we were unable to retrieve.
logger.warn("unable to retrieve client information for logout, skipping resource", ex);
}
});
logger.debugv("logging out {0} resources ", counter);
return finalResult;
}
Aggregations