protected function isExpired(array $tokenData, $tokenValidity = null)
    {
        return time() >
            $tokenData['time'] + (($tokenValidity!==null) ? $tokenValidity : self::TOKEN_VALIDITY);
    }