/*
Remove LTPA token if this is not a FORM login and the JASPI provider has not committed the response.
482681
private void attemptToRemoveLtpaToken(WebRequest webRequest, HashMap<String, Object> props) {
        SSOCookieHelper ssoCh = webAppSecurityConfig.createSSOCookieHelper();
        if (!isFormLogin(props)) {
            HttpServletResponse res = webRequest.getHttpServletResponse();
            if (!res.isCommitted()) {
                ssoCh.removeSSOCookieFromResponse(res);
            }
        }
    }
265129
public void removeChangeListener(@NonNull ListenerToken token) {
        if (token == null) { throw new IllegalArgumentException("token cannot be null."); }

        synchronized (lock) {
            if (!((token instanceof ReplicatorChangeListenerToken)
                || (token instanceof DocumentReplicationListenerToken))) {
                throw new IllegalArgumentException();
            }
            changeListenerTokens.remove(token);
            docEndedListenerTokens.remove(token);
            if (docEndedListenerTokens.size() == 0) {
                setProgressLevel(ReplicatorProgressLevel.OVERALL);
            }
        }
    }
987306
public void remove(Token token,
                       boolean requiresCurrentCheckpoint)
                    throws ObjectManagerException
    {
        final String methodName = "remove";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        methodName,
                        new Object[] { token, new Boolean(requiresCurrentCheckpoint) });

        // The token is no longer visible.
        inMemoryTokens.remove(new Long(token.storedObjectIdentifier));

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass, methodName);
    }
621603
public void removeRequestUrlAndParameters(HttpServletRequest request, HttpServletResponse response) {
        ReferrerURLCookieHandler referrerURLCookieHandler = getCookieHandler();
        referrerURLCookieHandler.invalidateReferrerURLCookie(request, response, ReferrerURLCookieHandler.REFERRER_URL_COOKIENAME);

        WebAppSecurityConfig webAppSecConfig = getWebAppSecurityConfig();
        if (isPostDataSavedInCookie(webAppSecConfig)) {
            deleteCookie(request, response, PostParameterHelper.POSTPARAM_COOKIE, webAppSecConfig);
        } else {
            removePostParameterSessionAttributes(request);
        }
    }
582159
def deletegitlabciservice(self, project_id, token, project_url):
        
        request = requests.delete(
            '{0}/{1}/services/gitlab-ci'.format(self.projects_url, project_id),
            headers=self.headers, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        return request.status_code == 200
928788
public static void removeActionForm(ActionMapping mapping, HttpServletRequest request) {
		if (mapping.getAttribute() != null) {
			if ("request".equals(mapping.getScope()))
				request.removeAttribute(mapping.getAttribute());
			else {
				HttpSession session = request.getSession();
				session.removeAttribute(mapping.getAttribute());
				request.removeAttribute(mapping.getAttribute());
			}
		}
	}
1154396
protected final void clearAuthenticationAttributes() {
        HttpSession session = http.getCurrentRequest().getSession(false);

        if (session == null) {
            return;
        }

        session.removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);
    }
1240302
@Override
  public void removeAuthorizedClient(String clientRegistrationId, String principalName) {
    Assert.hasText(clientRegistrationId, "clientRegistrationId cannot be empty");
    Assert.hasText(principalName, "principalName cannot be empty");
    ClientRegistration registration =
        this.clientRegistrationRepository.findByRegistrationId(clientRegistrationId);
    if (registration != null) {
      this.authorizedClients.remove(this.getIdentifier(registration, principalName));
    }
  }
816892
public void unregisterAuthenticationListener(String realm) {
        if (realm != null && !realm.isEmpty()) {
            challengeHandlers.remove(realm);
        }
    }
552916
public void remove( Token token ) {
        if( token == first ) {
            first = first.next;
        }
        if( token == last ) {
            last = last.previous;
        }
        if( token.next != null ) {
            token.next.previous = token.previous;
        }
        if( token.previous != null ) {
            token.previous.next = token.next;
        }

        token.next = token.previous = null;
        size--;
    }
175972
Token clearXAuth(Response response) {
        if (response.getCode() == 200 || response.getCode() == 201) {
            return parseXAuthResponse(response);
        } else {
            throw new JumblrException(response);
        }
    }
1322681
public void removeToken(Object token) {

        m_tokens.remove(token);
        if (m_tokens.isEmpty()) {
            if (m_joinAction != null) {
                m_joinAction.run();
            }
        }
    }
1205212
private void removeTransactionSession(String xferId, String sessionId) {
		List<String> sessions = transactionSessions.get(xferId);

		if(sessions != null){
			final boolean removal = sessions.remove(sessionId);
			if (removal) {
				ascpCount--;
			}
		}
	}
296693
private boolean isTokenLoggedOut(String ltpaToken) {
        boolean loggedOut = false;
        Object entry = LoggedOutTokenCacheImpl.getInstance().getDistributedObjectLoggedOutToken(ltpaToken);
        if (entry != null)
            loggedOut = true;
        return loggedOut;
    }
332540
public function deleteExpiredTokensAction()
    {
        if (!$this->request instanceof ConsoleRequest) {
            throw new RuntimeException('You can only use this action from console');
        }

        /* @var \ZfrOAuth2\Server\Service\TokenService $accessTokenService */
        $accessTokenService = $this->serviceLocator->get('ZfrOAuth2\Server\Service\AccessTokenService');
        $accessTokenService->deleteExpiredTokens();

        /* @var \ZfrOAuth2\Server\Service\TokenService $refreshTokenService */
        $refreshTokenService = $this->serviceLocator->get('ZfrOAuth2\Server\Service\RefreshTokenService');
        $refreshTokenService->deleteExpiredTokens();

        /* @var \ZfrOAuth2\Server\Service\TokenService $authorizationCodeService */
        $authorizationCodeService = $this->serviceLocator->get('ZfrOAuth2\Server\Service\AuthorizationCodeService');
        $authorizationCodeService->deleteExpiredTokens();

        return "\nExpired tokens were properly deleted!\n\n";
    }
256612
public static boolean validateToken(Controller controller, String tokenName) {
		String clientTokenId = controller.getPara(tokenName);
		if (tokenCache == null) {
			String serverTokenId = controller.getSessionAttr(tokenName);
			controller.removeSessionAttr(tokenName);		// important!
			return StrKit.notBlank(clientTokenId) && clientTokenId.equals(serverTokenId);
		}
		else {
			Token token = new Token(clientTokenId);
			boolean result = tokenCache.contains(token);
			tokenCache.remove(token);
			return result;
		}
	}
649833
public static boolean forgetIDTokensForServer(URL serverURL, TokenStore tokenStore) {
        OpenIDConnectAuthorizer authorizer = new OpenIDConnectAuthorizer(null, tokenStore);
        authorizer.setRemoteURL(serverURL);
        // Deliberately don't set auth.localUUID. This will leave kSecAttrAccount unset in the
        // dictionary passed to SecItemDelete, deleting keychain items for all accounts (databases).
        return authorizer.deleteTokens();
    }