I want to remove all the users sessions only for the specify client in Keycloak but I am not finding a way. What I did until now is as below:
List<UserSessionModel> userSessions = session.sessions()
.getUserSessionsStream(realm,client)
.collect(Collectors.toList())
for (UserSessionModel userSession : userSessions) {
AuthenticatedClientSessionModel clientSession = userSession.getAuthenticatedClientSessionByClient(client.getId());
userSession.removeAuthenticatedClientSessions(Collections.singleton(client.getId()));
}
How can I fix this?
I am trying to find a solution for this.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745573789a4633840.html
评论列表(0条)