You are here

function theme_cas_service_validate_success in CAS 6.3

Same name and namespace in other branches
  1. 7 cas_server.response.inc \theme_cas_service_validate_success()

Returns a CAS 2.0 service response for a validation success.

Parameters

$name: CAS username.

$attributes: If specified, the CAS attributes for the user.

2 theme calls to theme_cas_service_validate_success()
cas_server_service_validate in ./cas_server.module
serviceValidate method using cas 2.0 Returns data in xml
cas_test_service_validate in tests/cas_test.module
Validate a ticket using the CAS 2.0 protocol.

File

./cas_server.response.inc, line 16
Response callbacks for the CAS Server module.

Code

function theme_cas_service_validate_success($name, $attributes = array(), $style = 'jasig') {
  $output = "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>\n";
  $output .= "<cas:authenticationSuccess>\n";
  $output .= "<cas:user>{$name}</cas:user>\n";
  $output .= theme('cas_service_validate_attributes', $attributes, $style);
  $output .= "</cas:authenticationSuccess>\n";
  $output .= "</cas:serviceResponse>\n";
  return $output;
}