code: @Subscribe
      public void onLogout(LogoutRequestEvent event) {
          Subject subject = ThreadContext.getSubject();
          if (subject != null) {
              subject.logout();
          }
      }
docs: Logs out the current Subject (if any) when a {@link LogoutRequestEvent} is published.
  @param event The logout event.