You are here

function hook_openid_connect_client_info_alter in OpenID Connect / OAuth client 8

Same name and namespace in other branches
  1. 2.x openid_connect.api.php \hook_openid_connect_client_info_alter()

Alter the OpenID Connect client plugins information.

This hook is called after all OpenID Connect client plugins were discovered.

Popular use cases for this hook are programmatically adding plugin definitions or overriding methods of existing plugins by changing their plugin class to a custom class.

Parameters

array $client_info: An array of client information.

1 invocation of hook_openid_connect_client_info_alter()
OpenIDConnectClientManager::__construct in src/Plugin/OpenIDConnectClientManager.php
Constructor for OpenIDConnectClientManager objects.

File

./openid_connect.api.php, line 44
Documentation for OpenID Connect module APIs.

Code

function hook_openid_connect_client_info_alter(array &$client_info) {
  $client_info['generic'] = [
    'id' => 'generic',
    'label' => [
      'string' => 'Generic',
      'translatableMarkup' => NULL,
      'options' => [],
      'stringTranslation' => NULL,
      'arguments' => [],
    ],
    'class' => 'Drupal\\openid_connect\\Plugin\\OpenIDConnectClient\\Generic',
    'provider' => 'openid_connect',
  ];
}