当前位置: 动力学知识库 > 问答 > 编程问答 >

php - CAS server login

问题描述:

I have follwowing code on HRM application

include_once('CAS.php');

phpCAS::setDebug();

phpCAS::client(CAS_VERSION_2_0, "122.243.242.43", 443, 'cas',false);

phpCAS::setNoCasServerValidation();

phpCAS::forceAuthentication();

$userName = phpCAS::getUser();

If i commented all the cas code and then hard code the value as $userName = "temp" its working. when try to get the user name from cas server as $userName = phpCAS::getUser(); not working even i cant print $userName display nothing.

regards

roshan

网友答案:
phpCAS::client(CAS_VERSION_2_0, "122.243.242.43", 443, 'cas',false);

remove the false arg form the above statment then ok

网友答案:

Whatever code is in your ip address in your phpcas::cas call is the issue, make sure its setting valid variables that the cas client can use or post the code

分享给朋友:
您可能感兴趣的文章:
随机阅读: