src/wcmf/lib/core/impl/AuthTokenSession.php
protected function isTokenValid() {
    if ($this->isTokenValid) {
      // already validated
      return true;
    }
    $request = ObjectFactory::getInstance('request');
    $token = $request->hasHeader(self::TOKEN_HEADER) ? $request->getHeader(self::TOKEN_HEADER) :
        $request->getValue(self::TOKEN_HEADER, null);
    $this->isTokenValid = $token != null && $token == $_COOKIE[$this->tokenName];
    return $this->isTokenValid;
  }
protected function isTokenValid() {
    if ($this->isTokenValid) {
      // already validated
      return true;
    }
    $request = ObjectFactory::getInstance('request');
    $token = $request->hasHeader(self::TOKEN_HEADER) ? $request->getHeader(self::TOKEN_HEADER) :
        $request->getValue(self::TOKEN_HEADER, null);
    $this->isTokenValid = $token != null && $token == $_COOKIE[$this->tokenName];
    return $this->isTokenValid;
  }
protected function isTokenValid ( ) { if ( $ this -> isTokenValid ) { // already validated return true ; } $ request = ObjectFactory :: getInstance ( 'request' ) ; $ token = $ request -> hasHeader ( self :: TOKEN_HEADER ) ? $ request -> getHeader ( self :: TOKEN_HEADER ) : $ request -> getValue ( self :: TOKEN_HEADER , null ) ; $ this -> isTokenValid = $ token != null && $ token == $ _COOKIE [ $ this -> tokenName ] ; return $ this -> isTokenValid ; }
Check if the request contains a valid token
Check if the request contains a valid token