You are here

public function KeycloakService::getClientInstance in Keycloak OpenID Connect 8

Return a configured Keycloak client plugin for the openid_connect module.

Return value

\Drupal\openid_connect\Plugin\OpenIDConnectClientInterface Keycloak client plugin for the openid_connect module.

Overrides KeycloakServiceInterface::getClientInstance

File

src/Service/KeycloakService.php, line 325

Class

KeycloakService
Keycloak service.

Namespace

Drupal\keycloak\Service

Code

public function getClientInstance() {
  $config = $this->config
    ->get('settings');
  if (empty($config)) {
    $config = [];
  }
  return $this->oidcClientManager
    ->createInstance('keycloak', $config);
}