Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-34301

Cas logout with URL

XMLWordPrintable

    • MOODLE_22_STABLE, MOODLE_23_STABLE

      Hello,

      in the function prelogout_hook of the file auth/cas/auth.php (line 150 for mdl 2.3)

      This line is used to redirect the logged out user back to moodle :
      phpCAS::logoutWithURL($backurl);

      the url called will be for example :
      http://auth.myschool.net/cas/logout?url=http%3A%2F%2Fmoodle.myschool.net

      the only problem is :
      the "url" argument is not used by default and only usable with a hack on the cas server.
      Since a few versions, the redirect url is interpreted by the argument "service"

      the method in phpCas library is phpCAS::logoutWithRedirectService($backurl);

      I corrected the script and now the url argument which was ignored now redirects to the moodle after logout :

      http://auth.myschool.net/cas/logout?service=http%3A%2F%2Fmoodle.myschool.net

      So it's not a real BUG but an evolution following the cas protocol for single sign out.

            moodle.com Moodle HQ
            y.saludes Yoann Saludes
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.