Clear any existing authentication on the reddit object.

        This function is implicitly called on `login` and
        `set_access_credentials`.
16784
def clear_authentication(self):
        
        self._authentication = None
        self.access_token = None
        self.refresh_token = None
        self.http.cookies.clear()
        self.user = None
247586
def reset
      self.username = DEFAULT_USERNAME
      self.password = DEFAULT_PASSWORD
      self.uri = DEFAULT_URI
      self.api_version = DEFAULT_API_VERSION
      self.auth_type = DEFAULT_AUTH_TYPE
      self.project = nil
      self.oauth_secret = nil
      self.oauth_secret_filename = nil
      self.oauth_pass_phrase = nil
      self.oauth_consumer_key = nil
      self.config_path = nil
    end
1209285
def logout(self):
        

        self.revoke_refresh_token()
        self.revoke_access_token()

        self._username, self._password = None, None
510252
def prune_old_authorization_codes():
    

    from .compat import now
    from .models import AuthorizationCode
    
    AuthorizationCode.objects.with_expiration_before(now()).delete()
1031648
public function clearOAuthToken()
    {
        $this->access_token = null;
        $this->access_token_expiration = null;
        $this->refresh_token = null;
    }
1155715
def _clear(self):
        
        self.root = RootGroup()
        self.groups = []
        self.entries = []
        self.readonly = False
        self.header = None
        self.password = None
        self.keyfile = None
        self.filepath = None
1025163
def clean(self):
        
        super().clean()
        if (
            (self.user is None and not self.anonymous_user) or
            (self.user and self.anonymous_user)
        ):
            raise ValidationError(
                _('A permission should target either a user or an anonymous user'),
            )
1149566
public static void clearAccessContextOnThread() {
        final Stack<AccessContext> stack = threadLocal.get();
        if (stack != null) {
            stack.pop(); // remove latest
            if (stack.isEmpty()) {
                perfectlyClear();
            }
        }
    }
627853
def clean(self):
        
        if not self.instance.pk:
            # Only set user on post creation
            if not self.user.is_anonymous:
                self.instance.poster = self.user
            else:
                self.instance.anonymous_key = get_anonymous_user_forum_key(self.user)
        return super().clean()
142271
public void clearCache() {
        if (accountCache != null) {
            accountCache.invalidateAll();
        }
        for (Realm realm : allRealms) {
            if (realm instanceof CachingRealm) {
                CachingRealm cachingRealm = (CachingRealm) realm;
                cachingRealm.clearCache();
            }
        }
    }
937676
public void clearAll() {
        this.auths.clear();
        this.authsByUser.clear();
        File[] auths = this.authStoreDir.listFiles(new AuthFilenameFilter());
        for (int i = 0; i < auths.length; i++) {
            auths[i].delete();
        }
    }
1325273
def revoke(self):
        
        if not self.refresh_token and not self.access_token:
            raise AttributeError('No access/refresh token are defined.')

        if self.refresh_token:
            data = {
                'token_type_hint': 'refresh_token',
                'token': self.refresh_token,
            }
        else:
            data = {
                'token_type_hint': 'access_token',
                'token': self.access_token,
            }

        request_data = self.__prepare_token_request(data, self.oauth_revoke)

        self._session.post(**request_data)
        self.access_token = None
        self.refresh_token = None
        self.token_expiry = None
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];
        }
      });
    }
586580
function() {
      if (Parse.User._currentUser !== null) {
        Parse.User._currentUser._logOutWithAll();
        Parse.User._currentUser._isCurrentUser = false;
      }
      Parse.User._currentUserMatchesDisk = true;
      Parse.User._currentUser = null;
      Parse.localStorage.removeItem(
          Parse._getParsePath(Parse.User._CURRENT_USER_KEY));
    }
483589
def clear(self):
        
        all_keys = self._find_keys_raw(settings.THUMBNAIL_KEY_PREFIX)
        if all_keys:
            self._delete_raw(*all_keys)
365068
def revoke_tokens(self):
        

        self.is_active = False
        self.save()

        for access_token in self.access_tokens.all():
            access_token.revoke()
968966
public function clear()
    {
        $this->id = null;
        $this->max_clients = null;
        $this->domain = null;
        $this->valid_until = null;
        $this->serial = null;
        $this->alreadyInSave = false;
        $this->alreadyInValidation = false;
        $this->alreadyInClearAllReferencesDeep = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }