Remove the oAuth2 pieces from the hash fragment
12624
function(){
    var curHash = $location.hash();
    angular.forEach(hashFragmentKeys,function(hashKey){
      var re = new RegExp('&'+hashKey+'(=[^&]*)?|^'+hashKey+'(=[^&]*)?&?');
      curHash = curHash.replace(re,'');
    });

    $location.hash(curHash);
  }
1008675
def delete_metadata(address=None, tx_hash=None, block_hash=None, api_key=None, coin_symbol='btc'):
    '''
    
    '''
    assert is_valid_coin_symbol(coin_symbol), coin_symbol
    assert api_key, 'api_key required'

    kwarg = get_valid_metadata_identifier(
        coin_symbol=coin_symbol,
        address=address,
        tx_hash=tx_hash,
        block_hash=block_hash,
        )

    url = make_url(coin_symbol, meta=True, **kwarg)

    params = {'token': api_key}

    r = requests.delete(url, params=params, verify=True, timeout=TIMEOUT_IN_SECONDS)
    return get_valid_json(r, allow_204=True)
319442
def construct_request_hash
      request = {
        url: url,
        component: component,
        action: action,
        params: params,
        session: session,
        cgi_data: cgi_data,
        sanitizer: request_sanitizer
      }
      request.delete_if {|k,v| config.excluded_request_keys.include?(k) }
      Util::RequestPayload.build(request)
    end
1304097
function() {
      if (!this.isCurrent()) {
        return;
      }
      var authData = this.get('authData');
      if (!authData) {
        return;
      }
      Parse._objectEach(this.get('authData'), function(value, key) {
        if (!authData[key]) {
          delete authData[key];
        }
      });
    }
1240539
def remove(id, auth_ids)
      params = {
        id: id,
        auth_ids: auth_ids
      }
      requires params
      DataSift.request(:PUT, 'source/auth/remove', @config, params)
    end
1326530
def delete(method, hmc, uri, uri_parms, logon_required):
        """"""
        try:
            metrics_context = hmc.lookup_by_uri(uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        hmc.metrics_contexts.remove(metrics_context.oid)
905724
def revoke_oauth_credential(self):
        """"""
        if self.session.token_type == auth.SERVER_TOKEN_TYPE:
            return

        credential = self.session.oauth2credential
        revoke_access_token(credential)
1273224
def unroll_auth_headers(self, authheaders, exclude_signature=False, sep=",", quote=True):
        
        res = ""
        ordered = collections.OrderedDict(sorted(authheaders.items()))
        form = '{0}=\"{1}\"' if quote else '{0}={1}'
        if exclude_signature:
            return sep.join([form.format(k, urlquote(str(v), safe='')) for k, v in ordered.items() if k != 'signature'])
        else:
            return sep.join([form.format(k, urlquote(str(v), safe='') if k != 'signature' else str(v)) for k, v in ordered.items()])
34539
def api_hash(replace = nil)
      self.replace = replace unless replace.nil?
      {
        url:          href,
        description:  description,
        extended:     extended,
        tags:         tag.join(" "),
        replace:      replace,
        shared:       shared,
        toread:       toread
      }.select { |key, value| ! value.nil? }
    end
687739
def logout_oauth2(self):
        '''
        
        '''
        url = "https://api.robinhood.com/oauth2/revoke_token/"
        data = {
            "client_id": CLIENT_ID,
            "token": self.refresh_token,
        }
        res = self.post(url, payload=data)
        if res is None:
            self.account_id = None
            self.account_url = None
            self.access_token = None
            self.refresh_token = None
            self.mfa_code = None
            self.scope = None
            self.authenticated = False
            return True
        else:
            raise AuthenticationError("fast_arrow could not log out.")
88440
def delete(method, hmc, uri, uri_parms, logon_required):
        """"""
        try:
            resource = hmc.lookup_by_uri(uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        resource.manager.remove(resource.oid)
789941
def to_hash
      result = {
        name: @name,
        value: @value,
        domain: @domain,
        path: @path,
        created_at: @created_at
      }
      {
        expiry: @expiry,
        secure: (true if @secure),
        http_only: (true if @http_only),
        version: (@version if version != 0),
        comment: @comment,
        comment_url: @comment_url,
        discard: (true if @discard),
        ports: @ports
      }.each do |name, value|
        result[name] = value if value
      end

      result
    end
261945
def destroy
      # TODO: resolve the fact that there may be more than one for the same
      # provider.  either disallow multiple, or select the correct one.
      auth = Corkboard::Authorization.find_by_provider(params[:provider])
      auth.destroy if auth
      Corkboard.clear_all!

      redirect_to(authorizations_path)
    end
958384
def remove_authentication(self, auth_name=None, organization=None):
        
        if auth_name:
            if organization:
                url = '%s/authentications/org/%s/name/%s' % (self.domain, organization, auth_name)
            else:
                url = '%s/authentications/name/%s' % (self.domain, auth_name)
        else:
            url = '%s/authentications' % (self.domain,)

        res = self.session.delete(url)
        self._check_response(res, [201])
1201631
def clean():
    """"""
    os.chdir(os.path.join(project_root, 'docs'))
    sh("make clean")
    os.chdir(project_root)
    sh("rm -rf pyoauth2.egg-info")
1309432
public function withoutUtmParamsAndHashAnchors()
    {

        //remove utm params via regex replace, and cleanup and artifacts left behind afterwards
        $url = preg_replace('/\?$/', '', preg_replace('/&$/', '', preg_replace('/utm_[^&]+&?/i', '', $this->url)));

        //remove any hash anchors.
        $hash_pos = strpos($url, "#");
        if ($hash_pos !== false) {
            $url = substr($url, 0, $hash_pos);
        }

        return $url;
    }
847155
function () {
            if (!this._isIE7OrLess && this._hashChangeCallbackAdded) {
                this._hashChangeCallbackAdded = false;
                ariaUtilsEvent.removeListener(Aria.$window, 'hashchange', {
                    fn : this._internalCallback
                });
                ariaUtilsAriaWindow.detachWindow();
            }
        }