Я делаю приложение с аутентификацией по OpenID с помощью Spring Security. Когда пользователь входит в систему, некоторые службы загружаются в его сеанс.
У меня есть Пользователь с полным правом, который может изменять полномочия (отменять, добавлять роли) других пользователей. Мой вопрос заключается в том, как динамически менять полномочия пользовательской сессии? (нельзя использовать SecurityContextHolder, потому что я хочу изменить другой сеанс пользователя).
Простой способ: аннулировать сеанс пользователя, но как это сделать? Лучший способ: обновить сеанс пользователя новыми полномочиями, но как?