You are here

public static function AuthHelper::setTelemetry in Auth0 Single Sign On 8.2

Extend Auth0 PHP SDK telemetry to report for Drupal.

1 call to AuthHelper::setTelemetry()
AuthHelper::__construct in src/Util/AuthHelper.php
Initialize the Helper.

File

src/Util/AuthHelper.php, line 131
Contains \Drupal\auth0\Util\AuthHelper.

Class

AuthHelper
Controller routines for auth0 authentication.

Namespace

Drupal\auth0\Util

Code

public static function setTelemetry() {
  $oldInfoHeaders = ApiClient::getInfoHeadersData();
  if ($oldInfoHeaders) {
    $infoHeaders = InformationHeaders::Extend($oldInfoHeaders);
    $infoHeaders
      ->setEnvironment('drupal', \Drupal::VERSION);
    $infoHeaders
      ->setPackage('auth0-drupal', AUTH0_MODULE_VERSION);
    ApiClient::setInfoHeadersData($infoHeaders);
  }
}