//IsExpiredAt checks if the token is expired at a specific time
778368
func (at *AccessToken) IsExpiredAt(testtime time.Time) bool {
	return testtime.After(at.ExpirationTime())
}
432922
func (s *Session) Expired() error {
	if time.Now().After(s.ExpiresAt) {
		return &Error{
			Code: EForbidden,
			Msg:  ErrSessionExpired,
		}
	}

	return nil
}
1134871
func (t *Token) expired() bool {
	if t.Expiry.IsZero() {
		return false
	}
	return t.Expiry.Round(0).Add(-expiryDelta).Before(timeNow())
}
214313
func IsExpiredAtOrIn(from time.Time, until time.Duration, at time.Time, in time.Duration) (time.Time, bool) {
	expiration := TimeAtOrIn(from, at, in)
	if expiration.IsZero() {
		return expiration, false
	}

	return expiration, expiration.Before(time.Now().Add(until))
}
860395
func (c *Certificate) SetExpireDate(when time.Duration) error {
	offset := C.long(when / time.Second)
	result := C.X509_gmtime_adj(C.X_X509_get0_notAfter(c.x), offset)
	if result == nil {
		return errors.New("failed to set expire date")
	}
	return nil
}
948115
func checkExpiration(body *tokenserver.MachineTokenBody, now time.Time) error {
	notBefore := time.Unix(int64(body.IssuedAt), 0)
	notAfter := notBefore.Add(time.Duration(body.Lifetime) * time.Second)
	if now.Before(notBefore.Add(-allowedClockDrift)) {
		diff := notBefore.Sub(now)
		return fmt.Errorf("token is not valid yet, will be valid in %s", diff)
	}
	if now.After(notAfter.Add(allowedClockDrift)) {
		diff := now.Sub(notAfter)
		return fmt.Errorf("token expired %s ago", diff)
	}
	return nil
}
526604
func (s Session) SessionTimeoutExpiredOrMissing() bool {
	if exp, present := s[TimestampKey]; !present {
		return true
	} else if exp == SessionValueName {
		return false
	} else if expInt, _ := strconv.Atoi(exp.(string)); int64(expInt) < time.Now().Unix() {
		return true
	}
	return false
}
408196
func isExpired(csr *capi.CertificateSigningRequest) (bool, error) {
	if csr.Status.Certificate == nil {
		return false, nil
	}
	block, _ := pem.Decode(csr.Status.Certificate)
	if block == nil {
		return false, fmt.Errorf("expected the certificate associated with the CSR to be PEM encoded")
	}
	certs, err := x509.ParseCertificates(block.Bytes)
	if err != nil {
		return false, fmt.Errorf("unable to parse certificate data: %v", err)
	}
	return time.Now().After(certs[0].NotAfter), nil
}
964581
func (p *ProfileStatus) IsExpired(clock clockwork.Clock) bool {
	return p.ValidUntil.Sub(clock.Now()) <= 0
}
223971
func (r *record) isExpired() bool {
	if r.Expires == nil {
		return false
	}
	expiryDateUTC := time.Unix(*r.Expires, 0).UTC()
	return time.Now().UTC().After(expiryDateUTC)
}
1166280
public boolean hasExpired()
    {
        if ( expiresAt == null ) {
            LOGGER.debug( "hasExpired - token is not expirable" );
            return false;
        }

        long now = System.currentTimeMillis();
        if ( LOGGER.isDebugEnabled() ) {
            LOGGER.debug( "hasExpired? - now: {} expiredAt: {} ", new Date( now ), expiresAt );
        }
        return now > expiresAt.getTime();
    }
269924
func (r *Redis) PExpireAt(key string, timestamp int64) (bool, error) {
	rp, err := r.ExecuteCommand("PEXPIREAT", key, timestamp)
	if err != nil {
		return false, err
	}
	return rp.BoolValue()
}
281188
func (bk *Backend) isExpired(bv bucketItem) bool {
	if bv.ExpiryTime.IsZero() {
		return false
	}
	return bk.Clock().Now().After(bv.ExpiryTime)
}
958303
func (t *Token) expired() bool {
	if t.Expiry.IsZero() {
		return false
	}
	return t.Expiry.Add(-expiryDelta).Before(time.Now())
}
1174278
func (e *Expiry) IsExpired() bool {
	curTime := e.CurrentTime
	if curTime == nil {
		curTime = time.Now
	}
	return e.expiration.Before(curTime())
}
64325
func ExpiresAt(identityBytes []byte) time.Time {
	sId := &msp.SerializedIdentity{}
	// If protobuf parsing failed, we make no decisions about the expiration time
	if err := proto.Unmarshal(identityBytes, sId); err != nil {
		return time.Time{}
	}
	bl, _ := pem.Decode(sId.IdBytes)
	if bl == nil {
		// If the identity isn't a PEM block, we make no decisions about the expiration time
		return time.Time{}
	}
	cert, err := x509.ParseCertificate(bl.Bytes)
	if err != nil {
		return time.Time{}
	}
	return cert.NotAfter
}
230113
func (s *UpdateExpirationForHITInput) SetExpireAt(v time.Time) *UpdateExpirationForHITInput {
	s.ExpireAt = &v
	return s
}