| @@ 474-489 (lines=16) @@ | ||
| 471 | * @return a URL. |
|
| 472 | * @private |
|
| 473 | */ |
|
| 474 | function getServerProxyValidateURL() |
|
| 475 | { |
|
| 476 | // the URL is build only when needed |
|
| 477 | if (empty($this->_server['proxy_validate_url'])) { |
|
| 478 | switch ($this->getServerVersion()) { |
|
| 479 | case CAS_VERSION_1_0: |
|
| 480 | $this->_server['proxy_validate_url'] = ''; |
|
| 481 | break; |
|
| 482 | case CAS_VERSION_2_0: |
|
| 483 | $this->_server['proxy_validate_url'] = $this->getServerBaseURL() . 'proxyValidate'; |
|
| 484 | break; |
|
| 485 | } |
|
| 486 | } |
|
| 487 | // return $this->_server['proxy_validate_url'].'?service='.preg_replace('/&/','%26',$this->getURL()); |
|
| 488 | return $this->_server['proxy_validate_url'] . '?service=' . urlencode($this->getURL()); |
|
| 489 | } |
|
| 490 | ||
| 491 | /** |
|
| 492 | * This method is used to retrieve the proxy URL of the CAS server. |
|
| @@ 496-510 (lines=15) @@ | ||
| 493 | * @return a URL. |
|
| 494 | * @private |
|
| 495 | */ |
|
| 496 | function getServerProxyURL() |
|
| 497 | { |
|
| 498 | // the URL is build only when needed |
|
| 499 | if (empty($this->_server['proxy_url'])) { |
|
| 500 | switch ($this->getServerVersion()) { |
|
| 501 | case CAS_VERSION_1_0: |
|
| 502 | $this->_server['proxy_url'] = ''; |
|
| 503 | break; |
|
| 504 | case CAS_VERSION_2_0: |
|
| 505 | $this->_server['proxy_url'] = $this->getServerBaseURL() . 'proxy'; |
|
| 506 | break; |
|
| 507 | } |
|
| 508 | } |
|
| 509 | return $this->_server['proxy_url']; |
|
| 510 | } |
|
| 511 | ||
| 512 | /** |
|
| 513 | * This method is used to retrieve the logout URL of the CAS server. |
|