Projet

Général

Profil

Révision 4f315dab

Ajouté par Assos Assos il y a environ 8 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/cas/tests/cas_test.module
25 25
    'absolute' => TRUE,
26 26
  )));
27 27

  
28
  switch (variable_get('cas_version', '2.0')) {
28
  switch (variable_get('cas_version', '3.0')) {
29 29
    case CAS_VERSION_1_0:
30 30
      phpCAS::setServerServiceValidateURL(url('cas_test/validate', array('absolute' => TRUE)));
31 31
      break;
......
33 33
      phpCAS::setServerServiceValidateURL(url('cas_test/serviceValidate', array('absolute' => TRUE)));
34 34
      phpCAS::setServerProxyValidateURL(url('cas_test/proxyValidate',  array('absolute' => TRUE)));
35 35
      break;
36
    case CAS_VERSION_3_0:
37
      phpCAS::setServerServiceValidateURL(url('cas_test/p3/serviceValidate', array('absolute' => TRUE)));
38
      phpCAS::setServerProxyValidateURL(url('cas_test/p3/proxyValidate',  array('absolute' => TRUE)));
39
      break;
36 40
    default:
37 41
      throw new Exception('Unknown CAS server version.');
38 42
      break;
......
73 77
    'access callback' => TRUE,
74 78
    'type' => MENU_CALLBACK,
75 79
  );
80
  $items['cas_test/p3/serviceValidate'] = array(
81
    'page callback' => 'cas_test_service_validate',
82
    'title' => 'CAS 3.0 Service Validate',
83
    'access callback' => TRUE,
84
    'type' => MENU_CALLBACK,
85
  );
86
  $items['cas_test/p3/proxyValidate'] = array(
87
    'page callback' => 'cas_test_service_validate',
88
    'title' => 'CAS 3.0 Proxy Ticket Validate',
89
    'access callback' => TRUE,
90
    'type' => MENU_CALLBACK,
91
  );
76 92
  $items['cas_test/logout'] = array(
77 93
    'page callback' => 'cas_test_logout',
78 94
    'title' => 'CAS Logout',
......
151 167
}
152 168

  
153 169
/**
154
 * Validate a ticket using the CAS 2.0 protocol.
170
 * Validate a ticket using the CAS 2.0 and CAS 3.0 protocols.
155 171
 */
156 172
function cas_test_service_validate() {
157 173
  // Prevent this page from being cached.

Formats disponibles : Unified diff