0

I got regular cas authentication to work using the forceAuthentication function, now I want to block single sign on with renew authentication but it keeps getting stuck in a loop.

Here is my code

require_once 'CAS/CAS.php';
phpCAS::setDebug();
phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context, false);
phpCAS::setNoCasServerValidation();
phpCAS::renewAuthentication();
$user = phpCAS::getUser()
echo "welcome $user";

I'm using the latest version of phpcas : 1..33.

James
  • 194
  • 3
  • 10

1 Answers1

0

Use the following code:

phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context, false)

instead of this line:

phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
R.Katnaan
  • 2,486
  • 4
  • 24
  • 36