
LoadModule auth_openidc_module  /usr/lib/apache2/modules/mod_auth_openidc.so


<IfModule auth_openidc_module>
    OIDCProviderIssuer https://auth.groupe-genes.fr/realms/ensae
    OIDCProviderAuthorizationEndpoint https://auth.groupe-genes.fr/realms/ensae/protocol/openid-connect/auth
    OIDCProviderJwksUri https://auth.groupe-genes.fr/realms/ensae/protocol/openid-connect/certs
    OIDCProviderTokenEndpoint https://auth.groupe-genes.fr/realms/ensae/protocol/openid-connect/token
    OIDCProviderUserInfoEndpoint https://auth.groupe-genes.fr/realms/ensae/protocol/openid-connect/userinfo
    OIDCSSLValidateServer On
    OIDCRedirectURI /oidc_redirect_uri
    OIDCCryptoPassphrase gfdgfd
    OIDCClientID ${OIDC_CLIENT}
    OIDCClientSecret ${OIDC_SECRET}
    OIDCRemoteUserClaim preferred_username
    OIDCInfoHook userinfo
</IfModule>

SetEnvIf X-Forwarded-Proto "https" HTTPS=on



<Location />
AuthType openid-connect 
Require valid-user 
</Location>