You are here

public static function AuthenticationKeyType::generateKeyValue in Key 8

Generate a key value of this type using the submitted configuration.

Parameters

array $configuration: The configuration for the key type plugin.

Return value

string The generated key value.

Overrides KeyTypeInterface::generateKeyValue

File

src/Plugin/KeyType/AuthenticationKeyType.php, line 26

Class

AuthenticationKeyType
Defines a generic key type for authentication.

Namespace

Drupal\key\Plugin\KeyType

Code

public static function generateKeyValue(array $configuration) {

  // Generate a random 16-character password.
  return user_password(16);
}