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

Allow direct authentication with CAS to a course when multiple authentication is activated

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.2
    • Fix Version/s: 2.6
    • Component/s: Authentication
    • Labels:
    • Testing Instructions:
      Hide

      Testing prerequisites

      • You need a CAS authentication server configured with two sites, an external one and a moodle one.
      • You also need a CAS account subscribed on a moodle course.

      Testing instructions

      • Go to the external site who need CAS authentication
      • Authenticate yourself with your CAS account
      • on the address bar of your browser, go to your course using this url format:
        https://mymoodle.com/login/index.php?authCAS=CAS&courseid=12345
      • You should be able to access the home page of your course without the need to authenticate yourself again
      • Close all tab and windows on your browser (To kill CAS authentication session)
      • on the address bar of your browser, go to your course using this url format:
        https://mymoodle.com/login/index.php?authCAS=CAS&courseid=12345
      • You should now see the authentication page of your CAS server
      • Enter the authentication information
      • You should now be redirected to the home page of the course entered.
      Show
      Testing prerequisites You need a CAS authentication server configured with two sites, an external one and a moodle one. You also need a CAS account subscribed on a moodle course. Testing instructions Go to the external site who need CAS authentication Authenticate yourself with your CAS account on the address bar of your browser, go to your course using this url format: https://mymoodle.com/login/index.php?authCAS=CAS&courseid=12345 You should be able to access the home page of your course without the need to authenticate yourself again Close all tab and windows on your browser (To kill CAS authentication session) on the address bar of your browser, go to your course using this url format: https://mymoodle.com/login/index.php?authCAS=CAS&courseid=12345 You should now see the authentication page of your CAS server Enter the authentication information You should now be redirected to the home page of the course entered.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-41733_master

      Description

      In the portal of our University a student can connect directly to is course.
      Both the portal and Moodle use the same authentication, CAS.

      The problem is when we activate the Multi-authentication parameters on the CAS server configuration page, the CAS connected users from the portal are always prompted to choose their authentication method. Since they are already connected, we want to force the CAS auth.

      We can choose the auth method from the login url, ex:
      https://mymoodle.myuniversity.com/login/index.php?authCAS=CAS

      it should be nice to have the same for courses ex:
      https://mymoodle.myuniversity.com/course/view.php?id=12345&authCAS=CAS

      After checked in the code, this way needed to modify the code at others place than the CAS auth module so since, its a CAS specific customization, I think we should only modify the code in the auth/CAS/auth.php file.

      So the possible result will look like this:
      https://mymoodle.myuniversity.com/login/index.php?authCAS=CAS&courseid=12345

      I'll share the modification when finished.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/13