code: private static function loadFromJson($jsonArr)
      {
          if (!is_array($jsonArr)) {
              throw new AuthInfoLoadException("Expecting JSON object, found something else");
          }
  
          // Check access_token
          if (!array_key_exists('access_token', $jsonArr)) {
              throw new AuthInfoLoadException("Missing field \"access_token\"");
          }
  
          $accessToken = $jsonArr['access_token'];
          if (!is_string($accessToken)) {
              throw new AuthInfoLoadException("Expecting field \"access_token\" to be a string");
          }
  
          try {
              $host = Host::loadFromJson($jsonArr);
          }
          catch (HostLoadException $ex) {
              throw new AuthInfoLoadException($ex->getMessage());
          }
  
          return array($accessToken, $host);
      }
docs: Parses a JSON object to build an AuthInfo object.  If you would like to load this from a file,
  please use the @see loadFromJsonFile method.
  
  @param array $jsonArr
  A parsed JSON object, typcally the result of json_decode(..., true).
  @return array
  A `list(string $accessToken, Host $host)`.
  
  @throws AuthInfoLoadException