function _cas_test_ticket_validate in CAS 6.3
Same name and namespace in other branches
- 7 tests/cas_test.module \_cas_test_ticket_validate()
Validate a one-time-use login ticket.
Parameters
$service: The service URL.
$ticket: The login or proxy ticket.
Return value
The CAS username corresponding to the ticket, or FALSE if the ticket is invalid.
2 calls to _cas_test_ticket_validate()
- cas_test_service_validate in tests/
cas_test.module - Validate a ticket using the CAS 2.0 protocol.
- cas_test_validate in tests/
cas_test.module - Validate a ticket using the CAS 1.x protocol.
File
- tests/
cas_test.module, line 233 - Dummy module implementing a CAS Server.
Code
function _cas_test_ticket_validate($service, $ticket) {
// Look up the ticket
$cas_name = FALSE;
$tickets = variable_get('cas_test_tickets', array());
if (isset($tickets[$service][$ticket])) {
$cas_name = $tickets[$service][$ticket];
unset($tickets[$service][$ticket]);
}
return $cas_name;
}