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

Allow to disable identity providers via Moodle app feature settings

    XMLWordPrintable

Details

    • MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MDL-67644-master
    • Hide
      1. As admin, go to Site administration ►Mobile app ►Mobile features - Disabled features option. Check there is no section named "OAuth 2 identity providers" at the end.
      2. Go to Site administration ►Plugins ►Authentication►Manage authentication and enable "OAuth 2" by clicking the eye icon.
      3. Go to Site administration ►Server ►OAuth 2 services.
      4. Click to create a new service (any type will do: Google, Microsoft, Facebook, ...), enter any value in "Client ID" and "Client secret", make sure "Show on login page" is enabled and click Save changes.
      5. Go to Site administration ►Mobile app ►Mobile features - Disabled features option. Check there is a section named "OAuth 2 identity providers" at the end and it contains an option with the name you set to the service in the previous step.
      6. Go back to Site administration ►Server ►OAuth 2 services and create another service like you did in step 4.
      7. Go to Site administration ►Mobile app ►Mobile features - Disabled features option. Check there is a section named "OAuth 2 identity providers" at the end and it contains 3 options: the 2 services you created and an option called "All".
      8. Select the "All" option and save changes.
      9. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      10. Create a WS Token for one user on the site:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      11. Open a terminal/console and execute the following command:
        • You need to replace the wstoken with the token created in step 10 and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=tool_mobile_get_config&wstoken=3af67232a7596ceb658df4db329e5ad6&section=mobileapp' | python -m "json.tool"

      1. Check that in the WS response, in the tool_mobile_disabledfeatures value field, you see the following value "NoDelegate_IdentityProviders"
      2. Now, go back to Site administration ►Mobile app ►Mobile features - Disabled features option, unselect the "All" option and select any of the 2 services you created.
      3. Execute the CURL request again and check that the tool_mobile_disabledfeatures value is like "NoDelegate_IdentityProvider_1", where "1" will be the ID of the service you selected.
      4. Now, go back to Site administration ►Mobile app ►Mobile features - Disabled features option, and unselect all the options
      5. Execute the CURL request again and check that the tool_mobile_disabledfeatures value is empty
      Show
      As admin, go to Site administration ►Mobile app ►Mobile features - Disabled features option. Check there is no section named "OAuth 2 identity providers" at the end. Go to Site administration ►Plugins ►Authentication►Manage authentication and enable "OAuth 2" by clicking the eye icon. Go to Site administration ►Server ►OAuth 2 services. Click to create a new service (any type will do: Google, Microsoft, Facebook, ...), enter any value in "Client ID" and "Client secret", make sure "Show on login page" is enabled and click Save changes. Go to Site administration ►Mobile app ►Mobile features - Disabled features option. Check there is a section named "OAuth 2 identity providers" at the end and it contains an option with the name you set to the service in the previous step. Go back to Site administration ►Server ►OAuth 2 services and create another service like you did in step 4. Go to Site administration ►Mobile app ►Mobile features - Disabled features option. Check there is a section named "OAuth 2 identity providers" at the end and it contains 3 options: the 2 services you created and an option called "All". Select the "All" option and save changes. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a WS Token for one user on the site: Click on Site administration ► Plugins ► Web services ► Manage tokens Open a terminal/console and execute the following command: You need to replace the wstoken with the token created in step 10 and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=tool_mobile_get_config&wstoken=3af67232a7596ceb658df4db329e5ad6&section=mobileapp' | python -m "json.tool" Check  that in the WS response, in the tool_mobile_disabledfeatures value field, you see the following value "NoDelegate_IdentityProviders" Now, go back to Site administration ►Mobile app ►Mobile features - Disabled features option, unselect the "All" option and select any of the 2 services you created. Execute the CURL request again and check that the tool_mobile_disabledfeatures value is like "NoDelegate_IdentityProvider_1", where "1" will be the ID of the service you selected. Now, go back to Site administration ►Mobile app ►Mobile features - Disabled features option, and unselect all the options Execute the CURL request again and check that the tool_mobile_disabledfeatures value is empty

    Description

      We need to add a new option in Moodle app features -> Disabled features to allow site admins to disable identity providers (Google, Facebook or custom) for being displayed in the app

      Attachments

        Issue Links

          Activity

            People

              dpalou Dani Palou
              jleyva Juan Leyva
              Juan Leyva Juan Leyva
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Anna Carissa Sadia Anna Carissa Sadia
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Mar/20

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 40 minutes
                  3h 40m