You are here

public function Storage::checkClientCredentials in OAuth2 Server 7

File

lib/Drupal/oauth2_server/Storage.php, line 25

Class

Storage
Provides Drupal storage (through the underlying Entity API) for the library.

Namespace

Drupal\oauth2_server

Code

public function checkClientCredentials($client_key, $client_secret = null) {
  $client = $this
    ->getClientDetails($client_key);
  if (!$client) {
    return FALSE;
  }
  return oauth2_server_check_client_secret($client['client_secret'], $client_secret);
}