You are here

public function OAuth2Storage::isPublicClient in OAuth2 Server 8

Same name and namespace in other branches
  1. 2.0.x src/OAuth2Storage.php \Drupal\oauth2_server\OAuth2Storage::isPublicClient()

Is public client.

Parameters

string $client_id: The client id string.

Return value

bool Whether this is a public client.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/OAuth2Storage.php, line 223

Class

OAuth2Storage
Provides Drupal OAuth2 storage for the library.

Namespace

Drupal\oauth2_server

Code

public function isPublicClient($client_id) {
  $client = $this
    ->getClientDetails($client_id);
  return $client && empty($client['client_secret']);
}