Skip to content

Commit

Permalink
Add client URI support
Browse files Browse the repository at this point in the history
  • Loading branch information
dshanske committed Jun 29, 2024
1 parent 9b209f7 commit 70ca20e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/class-indieauth-client-discovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class IndieAuth_Client_Discovery {
public $client_id = '';
public $client_name = '';
public $client_icon = '';
public $client_uri = '';

public function __construct( $client_id ) {
$this->client_id = $client_id;
Expand Down Expand Up @@ -48,6 +49,7 @@ public function export() {
'client_id' => $this->client_id,
'client_name' => $this->client_name,
'client_icon' => $this->client_icon,
'client_uri' => $this->client_uri,
);
}

Expand Down Expand Up @@ -94,6 +96,9 @@ private function parse( $url ) {
if ( array_key_exists( 'logo_uri', $this->json ) ) {
$this->client_icon = $this->json['logo_uri'];
}
if ( array_key_exists( 'client_uri', $this->json ) ) {
$this->client_uri = $this->json['client_uri'];
}
} elseif ( 'text/html' === $content_type ) {
$content = wp_remote_retrieve_body( $response );
$domdocument = new DOMDocument();
Expand Down

0 comments on commit 70ca20e

Please sign in to comment.