ログアウトコントローラーでは、コードの組み合わせをたくさん書いてみました。今私はこれを持っています:
final Authentication auth = SecurityContextHolder.getContext().getAuthentication();
if (auth != null) {
new SecurityContextLogoutHandler().logout(request, response, auth);
}
SecurityContextHolder.getContext().setAuthentication(null);
auth.setAuthenticated(false);
ただし、コード実行トークンを提供した後も有効です。
私は何を間違っていますか?最終的にトークンを取り消す方法は?