diff --git a/docker/docker-compose.override.yml b/docker/docker-compose.override.yml index 48b71c2..0cc709e 100644 --- a/docker/docker-compose.override.yml +++ b/docker/docker-compose.override.yml @@ -52,6 +52,8 @@ services: - "8888:8080" volumes: - ../keycloak/realm.json:/opt/keycloak/data/import/realm.json + - ../keycloak/theme/customtheme:/opt/keycloak/themes/customtheme + command: start-dev --spi-theme-static-max-age=-1 --spi-theme-cache-themes=false --spi-theme-cache-templates=false --import-realm doc: image: squidfunk/mkdocs-material:8.3.9 diff --git a/keycloak/Dockerfile b/keycloak/Dockerfile index bff4988..7cfc756 100644 --- a/keycloak/Dockerfile +++ b/keycloak/Dockerfile @@ -6,5 +6,6 @@ FROM quay.io/keycloak/keycloak:21.1.0 COPY --from=ubi-micro-build /mnt/rootfs / COPY ./realm.json /opt/keycloak/data/import/realm.json +COPY ./theme/customtheme /opt/keycloak/themes/customtheme diff --git a/keycloak/realm.json b/keycloak/realm.json index 7a5d3d2..620c525 100644 --- a/keycloak/realm.json +++ b/keycloak/realm.json @@ -656,6 +656,7 @@ "frontchannelLogout" : true, "protocol" : "openid-connect", "attributes" : { + "login_theme" : "customtheme", "tls-client-certificate-bound-access-tokens" : "false", "oidc.ciba.grant.enabled" : "false", "backchannel.logout.session.required" : "true", @@ -1461,8 +1462,9 @@ } } ] }, - "internationalizationEnabled" : false, - "supportedLocales" : [ ], + "internationalizationEnabled" : true, + "supportedLocales" : [ "en", "fr" ], + "defaultLocale" : "en", "authenticationFlows" : [ { "id" : "d3c990a3-d06a-44f9-bbc8-f065e9dce1a6", "alias" : "Account verification options", diff --git a/keycloak/theme/customtheme/login/login.ftl b/keycloak/theme/customtheme/login/login.ftl new file mode 100644 index 0000000..d4e7ece --- /dev/null +++ b/keycloak/theme/customtheme/login/login.ftl @@ -0,0 +1,107 @@ +<#import "template.ftl" as layout> +<@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','password') displayInfo=realm.password && realm.registrationAllowed && !registrationDisabled??; section> + <#if section = "header"> + <${msg("loginAccountTitle")}> + <#elseif section = "form"> +