Logs out the user for the given HttpRequest.

        This should *not* assume the user is already logged in.
555099
def logout(self, request, extra_context=None):
        
        from django.contrib.auth.views import logout
        defaults = {
            'extra_context': extra_context or {},
            'template_name': 'cms/logged_out.html',
        }
        if self.logout_template is not None:
            defaults['template_name'] = self.logout_template
        return logout(request, **defaults)
1296509
def _logout_request(self, url_logout):
        

        requests.post(url_logout,
                      headers=self._req_headers,
                      timeout=self.timeout_resp, verify=False)
619717
public function logout(HTTPRequest $request)
    {
        $email = $request->requestVar('email');
        $member = Member::get()->filter(array('Email' => $email))->first();

        if ($member) {
            //logout
            $member->logout();

            if ($this->tokenConfig['owner'] === Member::class) {
                //generate expired token
                $tokenData = $this->generateToken(true);

                //write
                $tokenDBColumn = $this->tokenConfig['DBColumn'];
                $expireDBColumn = $this->tokenConfig['expireDBColumn'];

                $member->{$tokenDBColumn} = $tokenData['token'];
                $member->{$expireDBColumn} = $tokenData['expire'];
                $member->write();
            }
        }
    }
1187510
function postAuthLogout(req, res) {
    if (authMaintenance.usingSessions) {
      req.logout();
    }
    res.status(200).send('Ok');
  }
310415
def logout(self):
        
        self.req(API_ACCOUNT_LOGOUT % self.ck())
        self.cookies = {}
        self.user_alias = None
        self.persist()
997709
def logout(self):
        """"""

        if not self.logged_in:
            raise RuntimeError("User is not logged in")
        if self.conn.connected:
            params = {"room": self.conn.room.room_id}
            resp = self.conn.make_api_call("logout", params)
            if not resp.get("success", False):
                raise RuntimeError(
                    f"Logout unsuccessful: "
                    f"{resp['error'].get('message') or resp['error']}"
                )
            self.conn.make_call("logout", params)
            self.conn.cookies.pop("session")
        self.logged_in = False
845475
@GET
    @Produces(MediaType.TEXT_PLAIN)
    @Description("Terminates a user session. Not needed for existing auth api. This is just a placeholder method.")
    @Path("/logout")
    public Response logout(@Context UriInfo uriInfo) {
    	 return Response.ok("You have logged out.").build();
    }
1337451
public void logout(Context context, ResponseListener listener) {
        AuthorizationRequestManager.RequestOptions options = new AuthorizationRequestManager.RequestOptions();
        options.parameters = new HashMap<String,String>(1);
        options.parameters.put("client_id", preferences.clientId.get());
        options.headers = new HashMap<>(1);
        addSessionIdHeader(options.headers);
        options.requestMethod = Request.GET;
        try {
            authorizationRequestSend(context,"logout", options, listener);
        } catch (Exception e) {
            logger.debug("Could not log out");
        }
    }
150380
def logout_user():
    

    for key in ('identity.name', 'identity.auth_type'):
        session.pop(key, None)
    identity_changed.send(current_app._get_current_object(),
                          identity=AnonymousIdentity())
    _logout_user()
642175
def logout_user(f):
    

    @functools.wraps(f)
    def deco(*a, **kw):
        signals.user_logout(lambda: flask_login.current_user)
        flask_login.logout_user()
        return f(*a, **kw)

    return deco
118893
protected function execLogout()
    {
        $logoutService = $this->authFactory->newLogoutService();
        $auth = $this->authFactory->newInstance();
        $logoutService->logout($auth);
        $this->httpResponse = $this->httpResponse->withHeader('Location', '/' . $this->configuration['areas'][AREA]['authentication']['loginURL']);
    }
246665
def logout(self):
		
		result = self.users.logout_user()
		self.client.token = ''
		self.client.userid = ''
		self.client.username = ''
		self.client.cookies = None
		return result
493381
def logout(self):
        
        logger.debug("request backend logout")
        if not self.authenticated:
            logger.warning("Unnecessary logout ...")
            return True

        endpoint = 'logout'

        _ = self.get_response(method='POST', endpoint=endpoint)

        self.session.close()
        self.set_token(token=None)

        return True
132328
public function logoutSession()
    {
        $url = $this->serverUrl . "/logout.html";
        $this->restReq->prepAndSend($url, array(302), 'GET');     // Kill server session
        $this->restReq->closeCurlHandle(true);                    // cleanup client resources
    }
628227
def unauth(request):
    
    if check_key(request):
        api = get_api(request)
        request.session.clear()
        logout(request)
    return HttpResponseRedirect(reverse('main'))
921893
def logout
      handler = proc do
        if response.code == 204
          clear_session
        else
          case response.code
          when 401 then
            raise Jiralicious::NotLoggedIn, "Not logged in"
          else
            # Give Net::HTTP reason
            raise Jiralicious::JiraError, response
          end
        end
      end

      request(:delete, "/rest/auth/latest/session", handler: handler)
    end
1181219
def _logout(self):
        
        self.log.debug("Logging out from session ID: %s" % self._token)
        try:
            info = self._xmlrpc_server.LogOut(self._token)
            self.log.debug("Logout ended in %s with status: %s" %
                           (info['seconds'], info['status']))
        except ProtocolError as e:
            self.log.debug("error in HTTP/HTTPS transport layer")
            raise
        except Fault as e:
            self.log.debug("error in xml-rpc server")
            raise
        except:
            self.log.exception("Connection to the server failed/other error")
            raise
        finally:
            # force token reset
            self._token = None