Checks if user OTP token is recent...
@return bool
556070
final public static function isOtpTokenRecent () : bool
	{
		$maxElapsed = 60; // 1 min
		if (isset($_SESSION['otp_token_time'])) {
			$storedTime = $_SESSION['otp_token_time'];
			return ($storedTime + $maxElapsed) >= time();
		} else {
			return FALSE;
		}
	}
276709
public function isExpired()
    {
        if ($this->getExpiresAt() instanceof \DateTime) {
            return $this->getExpiresAt()->getTimestamp() < time();
        }

        if ($this->isAppAccessToken()) {
            return false;
        }

        return null;
    }
1188006
public function check()
    {
        if ($this->_session->has('auth')) {
            // They have an auth, let's attempt to check expiration
            // and master session
            $s = [
                'session' => $this->_session->get('SCARA_SESSION'),
                'token'   => $this->_session->get('SCARA_SESSION_TOKEN'),
            ];

            $ua = $this->_ssl->untokenize($s['token'], $s['session']);

            if ($ua === hash('sha256', $_SERVER['HTTP_USER_AGENT'])) {
                $expire = $this->_session->get('expire');
                if (time() < $expire) {
                    return true;
                } else {
                    $this->logout();
                }
            }
        }

        return false;
    }
1080855
public function isLoggedIn() : bool {

		// Requires a started session
		if (isset($_SESSION["login_token"])) {
			$loginToken = $_SESSION["login_token"];
			return $this->sessionManager->isValidLoginToken($loginToken);
		} else {
			return false;
		}
	}
1172874
public function __isAllowed()
    {
        if ($this->checkAuthentication !== true) {
            // this controller is not responsible for the authentication
            return false;
        }

        $this->typo3Loader->initializeFrontEndUser($this->determinePageIdFromArguments());

        $feUser = $this->typo3Loader->getFrontEndUser();
        if ($feUser->user === null) {
            return false;
        }
        return true;
    }
973180
public function verify()
    {
        // Check if time is expired
        $time = $this->request->getQuery('timestamp');
        if ($this->expireTime && time() - $time > $this->expireTime) {
            return false;
        }

        // Remove signature parameters
        $query = $this->request->getParameterReference('get');
        $token = $this->request->getQuery('signature');
        unset($query['signature']);

        $timestamp = $query['timestamp'];

        $query = $this->filterKeys($query, $this->params);

        $query['timestamp'] = $timestamp;

        return $this->generateToken($query) == $token;
    }
191308
public function isValid()
    {
        $payload = $this->getPayload();
        if (!isset($payload['exp'])) {
            return false;
        }

        $expireDateTime = DateTimeImmutable::createFromFormat('U', $payload['exp']);
        $now = new DateTime('now');
        return ($expireDateTime->getTimestamp() - $now->getTimestamp()) > 0;
    }
1050331
public function isExpired()
    {
        if (null === $this->expiresIn) {
            return false;
        }

        return ($this->createdAt + $this->expiresIn - time()) < 30;
    }
241173
public  function checkBeforeSend()
	{
		if ($this->ip != "unknown, unknown" && $this->botStop() && $this->checkBanIP($this->ip))
			return true;
		return false;
	}
1096077
private function isTokenNotExpired($token)
    {
        $payload = $this->getPayload($token);

        return isset($payload[self::EXP_KEY]) && $payload[self::EXP_KEY] > (new \DateTime())->getTimestamp();
    }
400109
public function isExpired()
    {
        return $this->hasPayLoad() && ($this->payLoad['created'] + $this->payLoad['expires_in']) < Carbon::now()
                                                                                                         ->format('U');
    }
882365
public function isExpired()
    {
        if (isset($this->_claims['exp']) && is_numeric($this->_claims['exp']))
        {
            $now  = new DateTime('now');
            return ($now->format('U') - $this->_claims['exp']) > 0;
        }

        return false;
    }
1009776
public function refreshToken() {
        if (!$this->delete()) {
            return false;
        }
        $this->isNewRecord = true;
        $this->refresh_token = $this->generateAccessToken();
        $this->expires = Time::timestamp(time() + 3600 * 24 * 365);
        $this->save();
        return OAuthAccessTokenModel::createToken($this->client_id, $this->user_id);
    }
573740
def _has_valid_token(self):
        
        return bool(self.token and (self.expires > datetime.datetime.now()))
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;
        }
    }
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();
    }
568879
public function isExpired()
    {
        $curTime = $this->timer['now'];
        $maxTime = $this->timer['last'] + $this->_lifetime;

        return ($maxTime < $curTime);
    }