Julio b8ed2a6da5 Add URL shortcuts see BT#15160 %!s(int64=5) %!d(string=hai) anos
..
lang 31d77cab2b Minor - check if file exists, add comments %!s(int64=5) %!d(string=hai) anos
KeycloakPlugin.php c9c2b87653 Minor - flint fixes %!s(int64=5) %!d(string=hai) anos
README.md ccf4d1b105 Minor - fix mapper type see BT#15160 %!s(int64=5) %!d(string=hai) anos
index.php 83031035d0 Add keycloack plugin BT#15160 %!s(int64=5) %!d(string=hai) anos
metadata.php bdfb2b1814 Minor - flint fixes %!s(int64=5) %!d(string=hai) anos
plugin.php 83031035d0 Add keycloack plugin BT#15160 %!s(int64=5) %!d(string=hai) anos
settings.dist.php b8ed2a6da5 Add URL shortcuts see BT#15160 %!s(int64=5) %!d(string=hai) anos
start.php d4d5e07b00 Minor - fix php errors %!s(int64=5) %!d(string=hai) anos

README.md

Keycloak

  1. Enable the plugin.
  2. Create a new settings.php file here plugin/keycloak/settings.php you can find an example here: plugin/keycloak/settings.dist.php

  3. Edit the settings.php file with your Keycloak settings:

'idp' => array(
    'entityId' => 'http://localhost:8080/auth/realms/master',
    'singleSignOnService' => array (
        'url' => 'http://localhost:8080/auth/realms/master/protocol/saml',
    ),
    'singleLogoutService' => array (
        'url' => 'http://localhost:8080/auth/realms/master/protocol/saml',
    ),
    'x509cert' => 'xxx',
)
  1. Configure your keycloak server with the following settings:

Change the client scope roles to "Single role attribute".

  • Client Scopes-> role_list -> Mappers -> role list -> "Single Role Attribute" = true

Add user mappers for "Firstname" "LastName" and "Email" so Chamilo can get those values.

Clients -> (select the client previously created) -> mappers -> create

Name: Email Mapper Type = User Property. User Attribute: Email Friendly Name: Email SAML Attribute Name: Email SAML Attribute: Basic

Repeat the process for the 3 attributes.

Create a demo user in keycloak

Try to login using the keycloak new button in Chamilo.