You are here

private function CasProxyHelper::getServerProxyUrl in CAS 2.x

Same name and namespace in other branches
  1. 8 src/Service/CasProxyHelper.php \Drupal\cas\Service\CasProxyHelper::getServerProxyUrl()

Format a CAS Server proxy ticket request URL.

Parameters

string $target_service: The service to be proxied.

Return value

string The fully formatted URL.

1 call to CasProxyHelper::getServerProxyUrl()
CasProxyHelper::getProxyTicket in src/Service/CasProxyHelper.php
Get a proxy ticket using a proxy granting ticket.

File

src/Service/CasProxyHelper.php, line 87

Class

CasProxyHelper
Default implementation of 'cas.proxy_helper' service.

Namespace

Drupal\cas\Service

Code

private function getServerProxyUrl($target_service) {

  // @todo Consider allowing the config to be altered.
  $casServerConfig = CasServerConfig::createFromModuleConfig($this->settings);
  $url = $casServerConfig
    ->getServerBaseUrl() . 'proxy';
  $params = [];
  $params['pgt'] = $this->session
    ->get('cas_pgt');
  $params['targetService'] = $target_service;
  return $url . '?' . UrlHelper::buildQuery($params);
}