You are here

public function OAuth2Storage::getPrivateKey in OAuth2 Server 8

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

Get private key.

Parameters

string|null $client_id: The client id string.

Return value

string The private key string.

File

src/OAuth2Storage.php, line 967

Class

OAuth2Storage
Provides Drupal OAuth2 storage for the library.

Namespace

Drupal\oauth2_server

Code

public function getPrivateKey($client_id = NULL) {

  // The library allows for per-client keys. The module uses global keys
  // that are regenerated every day, following Google's example.
  $keys = Utility::getKeys();
  return $keys['private_key'];
}