original_string: public static function isAccessTokenValid($token)
      {
          if (empty($token)) {
              return false;
          }
          $data = Yii::$app->jwt->getValidationData(); // It will use the current time to validate (iat, nbf and exp)
          $data->setIssuer(Yii::getAlias("@restIssuer"));
          $data->setAudience(Yii::getAlias("@restAudience"));
          $data->setId(Yii::getAlias("@restId")+strtotime(date('Y-m-d',time())), true);
          if (is_string($token))
              $token = Yii::$app->jwt->getParser()->parse($token);
  
          return $token->validate($data);
      }
code: public static function isAccessTokenValid($token)
      {
          if (empty($token)) {
              return false;
          }
          $data = Yii::$app->jwt->getValidationData(); // It will use the current time to validate (iat, nbf and exp)
          $data->setIssuer(Yii::getAlias("@restIssuer"));
          $data->setAudience(Yii::getAlias("@restAudience"));
          $data->setId(Yii::getAlias("@restId")+strtotime(date('Y-m-d',time())), true);
          if (is_string($token))
              $token = Yii::$app->jwt->getParser()->parse($token);
  
          return $token->validate($data);
      }
code_tokens: public static function isAccessTokenValid ( $ token ) { if ( empty ( $ token ) ) { return false ; } $ data = Yii :: $ app -> jwt -> getValidationData ( ) ; // It will use the current time to validate (iat, nbf and exp) $ data -> setIssuer ( Yii :: getAlias ( "@restIssuer" ) ) ; $ data -> setAudience ( Yii :: getAlias ( "@restAudience" ) ) ; $ data -> setId ( Yii :: getAlias ( "@restId" ) + strtotime ( date ( 'Y-m-d' , time ( ) ) ) , true ) ; if ( is_string ( $ token ) ) $ token = Yii :: $ app -> jwt -> getParser ( ) -> parse ( $ token ) ; return $ token -> validate ( $ data ) ; }
docstring: Validates access_token.
  
  @param string $token token to validate
  
  @return bool if token provided is valid for current user
docstring_tokens: Validates access_token .