You are here

private function CasValidator::formatProxyCallbackUrl in CAS 8

Same name and namespace in other branches
  1. 2.x src/Service/CasValidator.php \Drupal\cas\Service\CasValidator::formatProxyCallbackUrl()

Format the pgtCallbackURL parameter for use with proxying.

We have to do a str_replace to force https for the proxy callback URL, because it must use https, and setting the option 'https => TRUE' in the options array won't force https if the user accessed the login route over http and mixed-mode sessions aren't allowed.

Return value

string The pgtCallbackURL, fully formatted.

1 call to CasValidator::formatProxyCallbackUrl()
CasValidator::validateTicket in src/Service/CasValidator.php
Validate the service ticket parameter present in the request.

File

src/Service/CasValidator.php, line 446

Class

CasValidator
Class CasValidator.

Namespace

Drupal\cas\Service

Code

private function formatProxyCallbackUrl() {
  return str_replace('http://', 'https://', $this->urlGenerator
    ->generateFromRoute('cas.proxyCallback', [], [
    'absolute' => TRUE,
  ]));
}