Maarch Courrier permet de se connecter avec un portail Keycloak.
La configuration se fait dans le fichier de configuration apps/maarch_entreprise/xml/keycloakConfig.xml
Voici la partie à configurer :
    <ROOT>
        <AUTH_SERVER_URL>http://your.keycloak.server/authentication/path</AUTH_SERVER_URL>
        <REALM>maarch_courrier</REALM>
        <CLIENT_ID>maarch</CLIENT_ID>
        <CLIENT_SECRET>secret</CLIENT_SECRET>
        <REDIRECT_URI>http://demo.maarchcourrier.com/apps/maarch_entreprise/index.php?display=true&page=login</REDIRECT_URI> <!-- Should be the url of the login page -->
        <ENCRYPTION_ALGORITHM>RS256</ENCRYPTION_ALGORITHM>
        <ENCRYPTION_KEY_PATH>/path/to/key/file.pem</ENCRYPTION_KEY_PATH>
        <ENCRYPTION_KEY>key_content</ENCRYPTION_KEY>
    </ROOT>
Si vous avez paramétré votre instance Keycloak pour utiliser un algorithme de chiffrement, vous devez utiliser les paramètres suivants :
Vous ne pouvez pas utiliser ENCRYPTION_KEY_PATH et ENCRYPTION_KEY en même temps.
Ouvrir apps/maarch_entreprise/xml/login_method.xml et activer keycloak (copier le fichier dans votre custom si il n'est pas customisé) : 
    <METHOD>
        <ID>keycloak</ID>
        <ENABLED>true</ENABLED>
    </METHOD>
Il faut également mettre ENABLED à false pour toutes les autres méthodes