@@ -327,6 +327,14 @@ class phpCAS
327
327
* @param string $server_hostname the hostname of the CAS server
328
328
* @param int $server_port the port the CAS server is running on
329
329
* @param string $server_uri the URI the CAS server is responding on
330
+ * @param string|string[]|CAS_ServiceBaseUrl_Interface
331
+ * $service_base_url the base URL (protocol, host and the
332
+ * optional port) of the CAS client; pass
333
+ * in an array to use auto discovery with
334
+ * an allowlist; pass in
335
+ * CAS_ServiceBaseUrl_Interface for custom
336
+ * behavior. Added in 1.6.0. Similar to
337
+ * serverName config in other CAS clients.
330
338
* @param bool $changeSessionID Allow phpCAS to change the session_id
331
339
* (Single Sign Out/handleLogoutRequests
332
340
* is based on that change)
@@ -338,7 +346,8 @@ class phpCAS
338
346
* and phpCAS::setDebug()).
339
347
*/
340
348
public static function client ($ server_version , $ server_hostname ,
341
- $ server_port , $ server_uri , $ changeSessionID = true , \SessionHandlerInterface $ sessionHandler = null
349
+ $ server_port , $ server_uri , $ service_base_url ,
350
+ $ changeSessionID = true , \SessionHandlerInterface $ sessionHandler = null
342
351
) {
343
352
phpCAS :: traceBegin ();
344
353
if (is_object (self ::$ _PHPCAS_CLIENT )) {
@@ -357,7 +366,7 @@ public static function client($server_version, $server_hostname,
357
366
// initialize the object $_PHPCAS_CLIENT
358
367
try {
359
368
self ::$ _PHPCAS_CLIENT = new CAS_Client (
360
- $ server_version , false , $ server_hostname , $ server_port , $ server_uri ,
369
+ $ server_version , false , $ server_hostname , $ server_port , $ server_uri , $ service_base_url ,
361
370
$ changeSessionID , $ sessionHandler
362
371
);
363
372
} catch (Exception $ e ) {
@@ -373,6 +382,14 @@ public static function client($server_version, $server_hostname,
373
382
* @param string $server_hostname the hostname of the CAS server
374
383
* @param string $server_port the port the CAS server is running on
375
384
* @param string $server_uri the URI the CAS server is responding on
385
+ * @param string|string[]|CAS_ServiceBaseUrl_Interface
386
+ * $service_base_url the base URL (protocol, host and the
387
+ * optional port) of the CAS client; pass
388
+ * in an array to use auto discovery with
389
+ * an allowlist; pass in
390
+ * CAS_ServiceBaseUrl_Interface for custom
391
+ * behavior. Added in 1.6.0. Similar to
392
+ * serverName config in other CAS clients.
376
393
* @param bool $changeSessionID Allow phpCAS to change the session_id
377
394
* (Single Sign Out/handleLogoutRequests
378
395
* is based on that change)
@@ -384,7 +401,8 @@ public static function client($server_version, $server_hostname,
384
401
* and phpCAS::setDebug()).
385
402
*/
386
403
public static function proxy ($ server_version , $ server_hostname ,
387
- $ server_port , $ server_uri , $ changeSessionID = true , \SessionHandlerInterface $ sessionHandler = null
404
+ $ server_port , $ server_uri , $ service_base_url ,
405
+ $ changeSessionID = true , \SessionHandlerInterface $ sessionHandler = null
388
406
) {
389
407
phpCAS :: traceBegin ();
390
408
if (is_object (self ::$ _PHPCAS_CLIENT )) {
@@ -403,7 +421,7 @@ public static function proxy($server_version, $server_hostname,
403
421
// initialize the object $_PHPCAS_CLIENT
404
422
try {
405
423
self ::$ _PHPCAS_CLIENT = new CAS_Client (
406
- $ server_version , true , $ server_hostname , $ server_port , $ server_uri ,
424
+ $ server_version , true , $ server_hostname , $ server_port , $ server_uri , $ service_base_url ,
407
425
$ changeSessionID , $ sessionHandler
408
426
);
409
427
} catch (Exception $ e ) {
0 commit comments