code: public void postProgrammaticAuthenticate(HttpServletRequest req, HttpServletResponse resp, AuthenticationResult authResult) {
          postProgrammaticAuthenticate(req, resp, authResult, false, true);
      }
docs: This method set the caller and invocation subject and call the addSsoCookiesToResponse
  
  @param req
  @param resp
  @param authResult