scopes = $scopes; $this->site_url = $site_url; } /** * Returns the grant type identifier. * * @return string */ public function get_grant_type(): string { return 'client_credentials'; } /** * Returns the grant-specific parameters. * * @return array */ public function get_grant_params(): array { $params = [ 'site_url' => $this->site_url, ]; if ( ! empty( $this->scopes ) ) { $params['scope'] = \implode( ' ', $this->scopes ); } return $params; } }