code: public void simpleLogout(HttpServletRequest req, HttpServletResponse res) {
          createSubjectAndPushItOnThreadAsNeeded(req, res);
  
          AuthenticationResult authResult = new AuthenticationResult(AuthResult.SUCCESS, subjectManager.getCallerSubject());
          authResult.setAuditCredType(req.getAuthType());
          authResult.setAuditOutcome(AuditEvent.OUTCOME_SUCCESS);
          Audit.audit(Audit.EventID.SECURITY_API_AUTHN_TERMINATE_01, req, authResult, Integer.valueOf(res.getStatus()));
  
  	removeEntryFromAuthCacheForUser(req, res);
          invalidateSession(req);
          ssoCookieHelper.removeSSOCookieFromResponse(res);
          ssoCookieHelper.createLogoutCookies(req, res);
          subjectManager.clearSubjects();
  
      }
docs: Perform logout an user by doing the following:
  1) Invalidate the session
  2) Remove cookie if SSO is enabled
  3) Clear out the client subject
  
  @param req
  @param res