admin管理员组文章数量:1431911
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.
本文标签: javaKeycloak Client Remove UserSessionStack Overflow
版权声明:本文标题:java - Keycloak Client Remove UserSession - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745573789a2664206.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论