Skip to content
Browse Gluu Server 4.5

Release

Moodle

The following doc describes how to achieve SSO to Moodle using the Gluu Server IDP and the Moodle OpenID Connect (OIDC) plugin from Office 365.

#Install OIDC in Moodle

Clone the moodle-auth_oidc source code from its git repo:

# git clone https://github.com/Microsoft/moodle-auth_oidc.git

Let's assume that Moodle is installed at the following location:

/var/www/html/moodle.yoursite.com/public_html/.

Move the code to auth as follows:

# mv  moodle-auth_oidc   /var/www/html/moodle.yoursite.com/public_html/auth/oidc

Login as admin to your Moodle site and then navigate to:

Site administration > Plugins > Authentication

Follow the on-screen instructions about updating the database.

#Add OIDC Client in Gluu

In oxTrust, navigate to OpenID Connect > Clients.

Create a new client with the following specifications:

Attribute NameValues
Client NameYour desired value
Pre-AuthorizationEnabled
Authentication method for the Token Endpointclient_secret_post
Redirect Login URIshttps://<hostname>/auth/oidc/
Scopesaddress, email, openid, permission, phone, profile, user_name
Response Typescode, token, id_token
Grant Typesauthorization_code, implicit, refresh_token
Logout Session RequiredTrue

#Configure Gluu in Moodle

image

Enter the corresponding values in the Moodle OIDC form:

OIDC Form Field NameValues
Provider NameGluu OpenID Connect
Client IDEnter the value from the newly created client
Client SecretEnter the value from the newly created client
Authorization EndpointEnter the authorization_endpoint value, which can be found at https://<idp-hostname>/.well-known/openid-configuration
Token EndpointEnter the token_endpoint value, which can be found at https://<idp-hostname>/.well-known/openid-configuration
Redirect URI auth_oidchttps://<hostname>/auth/oidc/