You are here

function google_api_client_callback_url in Google API PHP Client 8.4

Same name and namespace in other branches
  1. 8.2 google_api_client.module \google_api_client_callback_url()
  2. 8.3 google_api_client.module \google_api_client_callback_url()

Checks https settings and returns appropriate callback url.

1 call to google_api_client_callback_url()
GoogleApiClientService::getClient in src/Service/GoogleApiClientService.php
Function to retrieve the google client for different operations.

File

./google_api_client.module, line 154
Google Api Client for drupal.

Code

function google_api_client_callback_url() {
  $is_https = \Drupal::request()
    ->isSecure();
  return \Drupal\Core\Url::fromRoute('google_api_client.callback', [], [
    'https' => $is_https,
    'absolute' => TRUE,
  ])
    ->toString();
}