Clears the session. Deletes cookies and clears the security context.
@param req HTTP request
967327
public static void clearSession(HttpServletRequest req) {
		SecurityContextHolder.clearContext();
		if (req != null) {
			HttpSession session = req.getSession(false);
			if (session != null) {
				session.invalidate();
			}
		}
	}
566090
public void clear() {
		accessTokenStore.clear();
		authenticationToAccessTokenStore.clear();
		clientIdToAccessTokenStore.clear();
		refreshTokenStore.clear();
		accessTokenToRefreshTokenStore.clear();
		authenticationStore.clear();
		refreshTokenAuthenticationStore.clear();
		refreshTokenToAccessTokenStore.clear();
		expiryQueue.clear();
	}
135245
function clearCache() {
    this._identityId = null;
    delete this.params.IdentityId;

    var poolId = this.params.IdentityPoolId;
    var loginId = this.params.LoginId || '';
    delete this.storage[this.localStorageKey.id + poolId + loginId];
    delete this.storage[this.localStorageKey.providers + poolId + loginId];
  }
159548
private function clearContext()
    {
        $this->url = NULL;
        $this->params = array();
        $this->headers = array();
        Logger::log('Context service for ' . static::class . ' cleared!');
        $this->closeConnection();
    }
1349210
@Override
    public void clear() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Clearing this request: " + this);
        }
        super.clear();
        this.myMethod = MethodValues.UNDEF;
        this.myScheme = null;
        this.myURIBytes = SLASH;
        this.myURIString = null;
        this.myQueryBytes = null;
        this.queryParams = null;
        this.sUrlHost = null;
        this.sHdrHost = null;
        this.iUrlPort = HeaderStorage.NOTSET;
        this.iHdrPort = NOT_TESTED;
    }
1266466
public final void removeSession (final Session sessionReq) throws NoSuchSessionException {

        final Session session = sessions.get(sessionReq.getTargetName());

        if (session != null) {
            sessions.remove(sessionReq.getTargetName());
        } else {
            throw new NoSuchSessionException("Session " + sessionReq.getTargetName() + " not found!");
        }
    }
936033
private function deleteSessionCookie() {
		$params = \session_get_cookie_params();

		// ask for the session cookie to be deleted (requests a cookie to be written on the client)
		$cookie = new Cookie(\session_name());
		$cookie->setPath($params['path']);
		$cookie->setDomain($params['domain']);
		$cookie->setHttpOnly($params['httponly']);
		$cookie->setSecureOnly($params['secure']);
		$result = $cookie->delete();

		if ($result === false) {
			throw new HeadersAlreadySentError();
		}
	}
321612
public void clear() {
	try {
	    Scope scope;
	    // Map.Entry entry,e;
	    // Map context;

	    // release all session scopes
	    Iterator<Entry<String, Map<String, Scope>>> sit = cfSessionContexts.entrySet().iterator();
	    Entry<String, Map<String, Scope>> sentry;
	    Map<String, Scope> context;
	    Iterator<Entry<String, Scope>> itt;
	    Entry<String, Scope> e;
	    PageContext pc = ThreadLocalPageContext.get();
	    while (sit.hasNext()) {
		sentry = sit.next();
		context = sentry.getValue();
		itt = context.entrySet().iterator();
		while (itt.hasNext()) {
		    e = itt.next();
		    scope = e.getValue();
		    scope.release(pc);
		}
	    }
	    cfSessionContexts.clear();

	    // release all application scopes
	    Iterator<Entry<String, Application>> ait = applicationContexts.entrySet().iterator();
	    Entry<String, Application> aentry;
	    while (ait.hasNext()) {
		aentry = ait.next();
		scope = aentry.getValue();
		scope.release(pc);
	    }
	    applicationContexts.clear();

	    // release server scope
	    if (server != null) {
		server.release(pc);
		server = null;
	    }

	}
	catch (Throwable t) {
	    ExceptionUtil.rethrowIfNecessary(t);
	}
    }
548717
public function freeRequest($req)
    {
        if ($this->state !== self::STATE_PROCESSING) {
            $this->freedBeforeProcessing = true;
            return;
        }
        $req->attrs->input = null;
        $this->req = null;
        $this->state = self::STATE_ROOT;
        $this->unfreezeInput();
    }
588543
function Session(context) {
    this.context = context
    this.cookies = context.cookies
    this.update = this.update.bind(this)
  }
61575
private void removeRequestUnprotected(ResourceRequest req) {
    Integer requestId = req.getId();
    removeGrantedResourceUnprotected(requestId);
    requestMap.remove(requestId);
  }
1275761
public function logout()
    {
        if ($this->has()) {
            $this->sessionBag->remove(self::AUTH_NAMESPACE);
        }

        if ($this->reAuth->isStored()) {
            $this->reAuth->clear();
        }
    }
16784
def clear_authentication(self):
        
        self._authentication = None
        self.access_token = None
        self.refresh_token = None
        self.http.cookies.clear()
        self.user = None
1267260
public void invalidateCookie(HttpServletRequest req, HttpServletResponse res, String cookieName, boolean enableHttpOnly) {
        Cookie c = new Cookie(cookieName, "");
        if (cookieName.equals("WASReqURL")) {
            c.setPath(getPathName(req));
        } else {
            c.setPath("/");
        }
        c.setMaxAge(0);
        if (enableHttpOnly && webAppSecConfig.getHttpOnlyCookies()) {
            c.setHttpOnly(true);
        }
        if (webAppSecConfig.getSSORequiresSSL()) {
            c.setSecure(true);
        }
        res.addCookie(c);
    }
365512
public static boolean clearCookie(Cookie[] cookies, HttpServletResponse response) {
        if (Checker.isNotEmpty(cookies)) {
            for (Cookie cookie : cookies) {
                removeCookie(cookie, response);
            }
            return true;
        }
        return false;
    }
722754
public function clear() {
        $this->statusCode = self::HTTP_OK;
        $this->headers = [];
        $this->cookies = [];
        $this->content = null;
        $this->sent = false;
    }
799090
public void clear() {
		requests.clear();
		rootCurrentContextsByThreadId.clear();
		if (errors != null) {
			synchronized (errors) {
				errors.clear();
			}
		}
		startDate = new Date();
	}