Returns whether this manager contains a valid non-expired pair of credentials.

@return whether this manager contains a valid non-expired pair of credentials or not.
512160
public boolean hasValidCredentials() {
        String encryptedEncoded = storage.retrieveString(KEY_CREDENTIALS);
        Long expiresAt = storage.retrieveLong(KEY_EXPIRES_AT);
        Boolean canRefresh = storage.retrieveBoolean(KEY_CAN_REFRESH);
        return !(isEmpty(encryptedEncoded) ||
                expiresAt == null ||
                expiresAt <= getCurrentTimeInMillis() && (canRefresh == null || !canRefresh));
    }
930688
def is_valid(self) -> bool:
        """"""
        if self.bot.config.SESSION_EXPIRE_TIMEOUT and \
                self._last_interaction and \
                datetime.now() - self._last_interaction > \
                self.bot.config.SESSION_EXPIRE_TIMEOUT:
            return False
        return True
820750
protected boolean needsToLoadCredentials() {
        if (credentials == null) return true;

        if (credentialsExpiration != null) {
            if (isWithinExpirationThreshold()) return true;
        }

        if (lastInstanceProfileCheck != null) {
            if (isPastRefreshThreshold()) return true;
        }

        return false;
    }
880325
public boolean isValid() {
		if (this.cpuCores >= 0 && this.heapMemoryInMB >= 0 && this.directMemoryInMB >= 0 &&
				this.nativeMemoryInMB >= 0 && this.stateSizeInMB >= 0) {
			for (Resource resource : extendedResources.values()) {
				if (resource.getValue() < 0) {
					return false;
				}
			}
			return true;
		} else {
			return false;
		}
	}
118131
public boolean isCredentialsValid(String username, String password) {
        try {
            String token = getTokenAuthenticationManager().login(StringUtil.toEmptyIfNull(username), StringUtil.toEmptyIfNull(password));
            getTokenAuthenticationManager().logout(token);

            return true;
        } catch (Exception ex) {
            return false;
        }
    }
937910
def is_credential_valid(self, credentialID):
        
        cur = self.conn.cursor()
        cur.execute('SELECT * FROM credentials WHERE id=? LIMIT 1', [credentialID])
        results = cur.fetchall()
        cur.close()
        return len(results) > 0
104558
public boolean hasCredentials() {
    return credentials.scheme() != null
        && !credentials.scheme().isEmpty()
        && credentials.authToken() != null;
  }
37385
private boolean checkExistingCertificate() {
		boolean alreadyexists = txt_PubCert.getDocument().getLength() > MIN_CERT_LENGTH;
		if (alreadyexists) {
			final int result = JOptionPane.showConfirmDialog(this,
					Constant.messages.getString("dynssl.message2.caalreadyexists")
					+ "\n"
					+ Constant.messages.getString("dynssl.message2.willreplace")
					+ "\n\n"
					+ Constant.messages.getString("dynssl.message2.wanttooverwrite"),
					Constant.messages.getString("dynssl.message2.title"),
					JOptionPane.YES_NO_OPTION);
			alreadyexists = !(result == JOptionPane.YES_OPTION);
		}
		return alreadyexists;
	}
1301888
def valid?
      status_validator = EnumAttributeValidator.new('String', ["AUTHORIZED", "CAPTURED", "VOIDED", "FAILED"])
      return false unless status_validator.valid?(@status)
      entry_method_validator = EnumAttributeValidator.new('String', ["SWIPED", "KEYED", "EMV", "ON_FILE", "CONTACTLESS"])
      return false unless entry_method_validator.valid?(@entry_method)
      return true
    end
946944
def valid?
      return false if @id.nil?
      return false if @test.nil?
      return false if @expired.nil?
      return false if @state.nil?
      state_validator = EnumAttributeValidator.new('String', ['pending', 'processed', 'invalid_data', 'error', 'image_download_failed', 'image_processing_failed', 'waiting_for_data_requests', 'liquid_syntax_error'])
      return false unless state_validator.valid?(@state)
      true
    end
779809
def is_expired(self):
        """"""
        expires = self.expires_at
        if expires is not None:
            return expires <= datetime.utcnow()

        return False
1331875
public boolean removeExpire() {
		try {
			if(!isBinary)return getJedisCommands(groupName).persist(key) == 1;
			if(isCluster(groupName)){
				return getBinaryJedisClusterCommands(groupName).persist(keyBytes) == 1;
			}
			return getBinaryJedisCommands(groupName).persist(keyBytes) == 1;
		} finally {
			getJedisProvider(groupName).release();
		}
	}
872297
public boolean isValid() {
        if (valid == null) {
            valid = (this.resource != null);
            if (valid) {
                valid = (getResourceResolver().getResource(getPath()) != null);
            }
        }
        return valid;
    }
583259
public function isExpired()
    {
        $this->validatePrepared();

        if (!$this->sessionBag->has(self::CSRF_TKN_TIME)) {
            return true;
        } else {
            $age = time() - $this->sessionBag->get(self::CSRF_TKN_TIME);
            return $age >= $this->ttl;
        }
    }
435522
def valid?
      return false if @id.nil?
      return false if @name.nil?
      authenticator_validator = EnumAttributeValidator.new('String', ["local", "ldap"])
      return false unless authenticator_validator.valid?(@authenticator)
      return true
    end
510528
public boolean isExpired(int seconds) {
        long diff = localIssuedAt.getTime() - issuedAt.getTime();
        long localExpiresAtTime = expiresAt.getTime() + diff;
        return (new Date().getTime() - seconds * 1000) >= localExpiresAtTime;
    }
1129252
protected boolean validateInternal(final J2EContext context, final String grantType, final ProfileManager manager,
                                       final UserProfile userProfile) {
        return false;
    }