function cas_server_validate in CAS 6.3
Same name and namespace in other branches
- 5.4 cas_server.module \cas_server_validate()
- 5.3 cas_server.module \cas_server_validate()
- 6.2 cas_server.module \cas_server_validate()
- 7 cas_server.module \cas_server_validate()
Validate the ticket using a CAS 1.x methodology This provides the simple non-xml based
1 string reference to 'cas_server_validate'
- cas_server_menu in ./
cas_server.module - Implementation of hook_menu
File
- ./
cas_server.module, line 137 - Provides a protocol compliant version of CAS server 2.x
Code
function cas_server_validate() {
// Prevent this page from being cached.
global $conf;
$conf['cache'] = FALSE;
// Set content type.
drupal_set_header('Content-Type: text/plain; charset=utf-8');
//Obtain the ticket from the url and validate it.
$ticket = isset($_REQUEST['ticket']) ? $_REQUEST['ticket'] : '';
$service = isset($_REQUEST['service']) ? $_REQUEST['service'] : '';
$user_name = _cas_server_validate($service, $ticket);
if ($user_name) {
print "yes\n";
print "{$user_name}\n";
}
else {
print "no\n";
print "\n";
}
}