This guide describes how to connect a Moodle instance to Google Apps authentication service. Please replace every sso.appsedudemo.com with your domain and idp-moodle.sso.appsedudemo.com/idp-moodle with your Moodle installation URL.
Prerequisites:
Tomcat 7
OpenAM
Google Apps domain
Moodle with OAuth2 plugin installed.
Instructions:
If you have not already configured Google Apps as IdP please follow the Configuring Google Apps as an IdP through OAuth2 using OpenAM guide.
Install OpenAM If you have not already installed please follow the Installing OpenAM guide.
Log-in to OpenAM web admin:
Click on “Access Control”
Click on / (Top Level Realm)
Click on “Authentication”
On “Module Instances” select the google option (created on the tutorial of the the first point).
Change the "Proxy URL" field to: http://idp-moodle.sso.appsedudemo.com/idp-moodle/auth/googleoauth2/google_redirect.php
Save and Back to Authentication.
Open a new tab on browser
Go to your moodle instance and login as an admin.
Go to Plugins > Authentication > OAuth2 (if it is disabled, enable it)
Paste your Google Client ID and Client Secret (provided on the tutorial of the the first point).
Save and logout.
The configuration is complete, From now you will use this link: http://openam.sso.appsedudemo.com:8080/openam/UI/Login?realm=&module=google instead of the original Moodle URL.