original_string: private function validateToken($token)
      {
          // Without a session file, no token will validate.
          if (!file_exists($this->config->getSessionFileName()))
          {
              return false;
          }
  
          $encrypted = file_get_contents($this->config->getSessionFileName()); // Read encrypted session file.
  
          $plain = Encryption::decrypt($encrypted, $this->config->getSecretKey()); // Decrypt data.
          $file = Spyc::YAMLLoadString($plain); // Parse YAML.
  
          return $token == $file['token'] && time() < $file['expires']; // Token must be valid and not expired.
      }
code: private function validateToken($token)
      {
          // Without a session file, no token will validate.
          if (!file_exists($this->config->getSessionFileName()))
          {
              return false;
          }
  
          $encrypted = file_get_contents($this->config->getSessionFileName()); // Read encrypted session file.
  
          $plain = Encryption::decrypt($encrypted, $this->config->getSecretKey()); // Decrypt data.
          $file = Spyc::YAMLLoadString($plain); // Parse YAML.
  
          return $token == $file['token'] && time() < $file['expires']; // Token must be valid and not expired.
      }
code_tokens: private function validateToken ( $ token ) { // Without a session file, no token will validate. if ( ! file_exists ( $ this -> config -> getSessionFileName ( ) ) ) { return false ; } $ encrypted = file_get_contents ( $ this -> config -> getSessionFileName ( ) ) ; // Read encrypted session file. $ plain = Encryption :: decrypt ( $ encrypted , $ this -> config -> getSecretKey ( ) ) ; // Decrypt data. $ file = Spyc :: YAMLLoadString ( $ plain ) ; // Parse YAML. return $ token == $ file [ 'token' ] && time ( ) < $ file [ 'expires' ] ; // Token must be valid and not expired. }
docstring: Returns true if the given authentication token is valid, otherwise returns false.
  
  @param string $token the authentication token to validate
  @return bool
docstring_tokens: Returns true if the given authentication token is valid otherwise returns false .