Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-1545

Support to log in via SSO with an embedded browser

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup

      1. Install the local plugin from https://github.com/albertgasset/moodle-local_mobile/tree/MOBILE-1545-30
      2. Set the setting “Type of login” of the local plugin to “Via an embedded browser (for SSO plugins).

      Case: Normal login

      1. Open the app in. If a user is already logged in go to “Change site” and click “+” to add a new user. Enter the site address and click “Connect!”. Expected result: The dialog with the message “You need to log in in the site in a browser window” is shown.
      2. Click “OK”. Expected result: An ambedded browser is opened, replacing the content of the app.
      3. Enter username and password and click “Log in”. Expected result: The browser is closed and the “My courses” page is shown. The user is logged in.

      Case: Login with a fixed site URL

      1. Build the app with a “siteurl” defined in www/config.json.
      2. Open the app in. If a user is already logged in go to “Change site” and click “+” to add a new user. Expected result: A dialog is shown with the message “You need to log in in the site in a browser window”.
      3. Follow steps 2 and 3 of “Normal login” case.

      Case: Login after expired token

      1. Open the app, login with a user amd go to “My courses”.
      2. In Modole, go to “Security keys” of the user and reset the token for “Moodle Mobile additional features service”.
      3. In the app, refresh the list of courses. Expected result: a dialog is shown with the message: “Your authentication token is invalid ... You need to log in in the site in a browser window”.
      4. Follow steps 2 and 3 of “Normal login” case.

      Case: Login when opening a content link

      1. Create a content link to the app somewhere in Moodle, with a user that is not logged. For example: moodlemobile://link=http://username@http://www.example.com/course/view.php?id=2
      2. Log in the app with a different user and click the link. Expected result: A dialog is shown with the message: “You need to log in in the site in a browser window”.
      3. Follow steps 2 and 3 of “Normal login” case.
      Show
      Setup Install the local plugin from https://github.com/albertgasset/moodle-local_mobile/tree/MOBILE-1545-30 Set the setting “Type of login” of the local plugin to “Via an embedded browser (for SSO plugins). Case: Normal login Open the app in. If a user is already logged in go to “Change site” and click “+” to add a new user. Enter the site address and click “Connect!”. Expected result: The dialog with the message “You need to log in in the site in a browser window” is shown. Click “OK”. Expected result: An ambedded browser is opened, replacing the content of the app. Enter username and password and click “Log in”. Expected result: The browser is closed and the “My courses” page is shown. The user is logged in. Case: Login with a fixed site URL Build the app with a “siteurl” defined in www/config.json. Open the app in. If a user is already logged in go to “Change site” and click “+” to add a new user. Expected result: A dialog is shown with the message “You need to log in in the site in a browser window”. Follow steps 2 and 3 of “Normal login” case. Case: Login after expired token Open the app, login with a user amd go to “My courses”. In Modole, go to “Security keys” of the user and reset the token for “Moodle Mobile additional features service”. In the app, refresh the list of courses. Expected result: a dialog is shown with the message: “Your authentication token is invalid ... You need to log in in the site in a browser window”. Follow steps 2 and 3 of “Normal login” case. Case: Login when opening a content link Create a content link to the app somewhere in Moodle, with a user that is not logged. For example: moodlemobile://link= http://username@http://www.example.com/course/view.php?id=2 Log in the app with a different user and click the link. Expected result: A dialog is shown with the message: “You need to log in in the site in a browser window”. Follow steps 2 and 3 of “Normal login” case.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
    • Sprint:
      Moodle Mobile 3.1.0

      Description

      Right now if a site is configured to force log in via the browser, the stock browser app is launched requesting the user credentials.

      Instead launching the Inapp browser (embedded browser) we launch the stock browser to have a fully functional browser supporting javascript popups and other features.

      We should add a new option in local_mobile "Via a embedded browser" to improve the user experience (the browser will be displayed embedded in the app).

      This will require some changes:

        Attachments

          Activity

            People

            • Assignee:
              albert.gasset Albert Gasset
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Dani Palou
              Integrator:
              Juan Leyva
              Tester:
              Juan Leyva
              Participants:
              Component watchers:
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                23/May/16