Generates a Logout Response object.

@param string $inResponseTo InResponseTo value for the Logout Response.
513604
public function build($inResponseTo)
    {

        $spData = $this->_settings->getSPData();
        $idpData = $this->_settings->getIdPData();

        $this->id = OneLogin_Saml2_Utils::generateUniqueID();
        $issueInstant = OneLogin_Saml2_Utils::parseTime2SAML(time());

        $spEntityId = htmlspecialchars($spData['entityId'], ENT_QUOTES);
        $logoutResponse = <<<LOGOUTRESPONSE
<samlp:LogoutResponse xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
                  xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
                  ID="{$this->id}"
                  Version="2.0"
                  IssueInstant="{$issueInstant}"
                  Destination="{$idpData['singleLogoutService']['url']}"
                  InResponseTo="{$inResponseTo}"
                  >
    <saml:Issuer>{$spEntityId}</saml:Issuer>
    <samlp:Status>
        <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
    </samlp:Status>
</samlp:LogoutResponse>
LOGOUTRESPONSE;
        $this->_logoutResponse = $logoutResponse;
    }
186472
protected function createResponse(BlockContextInterface $blockContext, Response $response = null)
    {
        if (null === $response) {
            $response = new Response();
        }

        // set the ttl from the block instance, this can be changed by the BlockService
        if (($ttl = $blockContext->getBlock()->getTtl()) > 0) {
            $response->setTtl($ttl);
        }

        return $response;
    }
300197
public function logout()
    {
        try {
            $this->startBrokerSession();
            $this->setSessionData('sso_user', null);
        } catch (SSOServerException $e) {
            return $this->returnJson(['error' => $e->getMessage()]);
        }

        return $this->returnJson(['success' => 'User has been successfully logged out.']);
    }
1022270
private function storeCachedResponse(Response $response, $method, $url, array $data, array $headers, $minutes)
    {
        if ($this->cache and $minutes > 0)
        {
            $this->cache->storeResponse($response, $method, $url, $data, $headers, $this->basicAuthCredentials, $minutes);
        }
    }
278378
protected function createResponse($pid, $alias, $timeout = 0.0, $timeoutIncrease = 1.0)
    {
        return new ResponseRecord($pid, $alias, $timeout, $timeoutIncrease);
    }
1305939
public function logout(Request $request, Response $response, TokenInterface $token)
    {
        $this->cancelCookie($request);
    }
825292
public function logout(Request $request): JsonResponse
    {
        /** @var HCUser $user */
        $user = $request->user();
        $user->updateLastActivity();
        $user->token()->revoke();

        return $this->response->success(trans('HCCore::users.message.logged_out'));
    }
827553
protected function checkResponse(ResponseInterface $response, $data)
    {
        // Standard error response format
        if (!empty($data['meta']['error_type'])) {
            throw InstagramIdentityProviderException::clientException($response, $data);
        }

        // OAuthException error response format
        if (!empty($data['error_type'])) {
            throw InstagramIdentityProviderException::oauthException($response, $data);
        }
    }
1336217
public function logout(Request $request, Response $response, TokenInterface $token)
    {
        foreach ($this->cookies as $cookieName => $cookieData) {
            $response->headers->clearCookie($cookieName, $cookieData['path'], $cookieData['domain']);
        }
    }
711701
public function logout() {
        $response=CodeBank_ClientAPI::responseBase();
        
        //Session now expired
        $response['session']='expired';
        
        $member=Member::currentUser();
        if($member) {
            $member->logOut();
        }
        
        return $response;
    }
720796
public static void logout(CmsObject cms, HttpServletRequest request, HttpServletResponse response)
    throws IOException {

        String loggedInUser = cms.getRequestContext().getCurrentUser().getName();
        HttpSession session = request.getSession(false);
        if (session != null) {
            session.invalidate();
            /* we need this because a new session might be created after this method,
             but before the session info is updated in OpenCmsCore.showResource. */
            cms.getRequestContext().setUpdateSessionEnabled(false);
        }
        // logout was successful
        if (LOG.isInfoEnabled()) {
            LOG.info(
                org.opencms.jsp.Messages.get().getBundle().key(
                    org.opencms.jsp.Messages.LOG_LOGOUT_SUCCESFUL_3,
                    loggedInUser,
                    cms.getRequestContext().addSiteRoot(cms.getRequestContext().getUri()),
                    cms.getRequestContext().getRemoteAddress()));
        }
        response.sendRedirect(getFormLink(cms));
    }
762885
public function deauthenticate(ResponseFactory $response, Guard $guard, JWTAuth $auth)
    {
        $guard->logout();
        $auth->invalidate();

        return $response->json([]);
    }
965711
public function logout(Request $request, Response $response, TokenInterface $token)
    {
        // Remove host override
        if ($request->hasPreviousSession() && $request->getSession()->has(DomainConfiguration::OVERRIDE_HOST)) {
            $request->getSession()->remove(DomainConfiguration::OVERRIDE_HOST);
        }
    }
1351202
public function logOut() {
      $data["Envelope"] = array(
        "Body" => array(
          "Logout" => ""
        ),
      );
      $response = $this->_request($data);
      $result = $response["Envelope"]["Body"]["RESULT"];
      return $this->_isSuccess($result);
    }
1149419
public function getPostLoginRedirectResponse($resetSessionPostLoginUrl = false)
    {
        $result = $this->responseFactory->redirect(
            $this->getPostLoginUrl($resetSessionPostLoginUrl),
            Response::HTTP_FOUND
        );
        // Disable caching for response
        $result = $result->setMaxAge(0)->setSharedMaxAge(0)->setPrivate();
        $result->headers->addCacheControlDirective('must-revalidate', true);
        $result->headers->addCacheControlDirective('no-store', true);

        return $result;
    }
623775
public function setResponseCookie($response, $name, $value = null, $expiration = 0)
    {
        $expiration = 1;
        if ($expiration == 0) {
            $expiration = 30;
        }
        if (is_numeric($expiration)) {
            $expiration = $expiration;
        }

        $response = FigResponseCookies::set(
            $response,
            SetCookie::create($name)
            ->withExpires(Carbon::parse()->timestamp + 60*60*24*$expiration)
            ->withValue($value)
        );

        return $response;
    }
1127966
public function storeResponse(Response $response, $method, $url, array $data = [], array $headers = [], $basicAuthCredentials = '', $minutes = 30)
    {
        $signature = $this->signature->generate($method, $url, $data, $headers, $basicAuthCredentials);

        $this->cacheManager->store($signature, $response, $minutes);
    }