options = isset($options) ? $options : new JRegistry; $this->options->def('accessTokenURL', 'http://www.openstreetmap.org/oauth/access_token'); $this->options->def('authoriseURL', 'http://www.openstreetmap.org/oauth/authorize'); $this->options->def('requestTokenURL', 'http://www.openstreetmap.org/oauth/request_token'); /* $this->options->def('accessTokenURL', 'http://api06.dev.openstreetmap.org/oauth/access_token'); $this->options->def('authoriseURL', 'http://api06.dev.openstreetmap.org/oauth/authorize'); $this->options->def('requestTokenURL', 'http://api06.dev.openstreetmap.org/oauth/request_token'); */ // Call the JOauth1Client constructor to setup the object. parent::__construct($this->options, $client, $input, null, '1.0'); } /** * Method to verify if the access token is valid by making a request to an API endpoint. * * @return boolean Returns true if the access token is valid and false otherwise. * * @since 13.1 */ public function verifyCredentials() { return true; } /** * Method to validate a response. * * @param string $url The request URL. * @param JHttpResponse $response The response to validate. * * @return void * * @since 13.1 * @throws DomainException */ public function validateResponse($url, $response) { if ($response->code != 200) { $error = htmlspecialchars($response->body); throw new DomainException($error, $response->code); } } }