Hanzo
PlatformHanzo IAMIntegrationsPHP

Moodle

Using OAuth to connect Moodle

Hanzo IAM can be used to connect Moodle using OAuth.

The following are some configuration settings:

  • IAM_HOSTNAME: The domain name or IP where the Hanzo IAM server is deployed.
  • Moodle_HOSTNAME: The domain name or IP where Moodle is deployed.

Step 1: Deploy Hanzo IAM and Moodle

First, deploy Hanzo IAM and Moodle.

After successful deployment, ensure the following:

  1. Hanzo IAM can be logged in and used without issues.
  2. You can set IAM_HOSTNAME as http://localhost:8000 when deploying Hanzo IAM in prod mode. See production mode.

Step 2: Configure Hanzo IAM Application

  1. Create a new Hanzo IAM application or use an existing one.
  2. Find the redirect URL: <Moodle_HOSTNAME>/admin/oauth2callback.php.
  3. Add the redirect URL to the Hanzo IAM application.

See OAuth.

Step 3: Configure Moodle

  1. Locate OAuth Find_OAuth.
  2. Configure this application configure.
  3. Configure this mapping Mapping.
  4. Locate the OAuth2 plugin plugin.
  5. Enable the OAuth2 plugin Enable.
  6. If you want to prevent the editing of Hanzo IAM's email Fields.

Log out of Moodle and test SSO. Login

How is this guide?

Last updated on

On this page