Skip to content

Commit

Permalink
Update login theme to login v2
Browse files Browse the repository at this point in the history
Fixes: keycloak#29009

Signed-off-by: Hynek Mlnarik <[email protected]>
  • Loading branch information
hmlnarik committed Jul 18, 2024
1 parent ab6ca32 commit a7374f9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion common/src/main/java/org/keycloak/common/Profile.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public enum Feature {

ADMIN2("New Admin Console", Type.DEFAULT, Feature.ADMIN_API),

LOGIN2("New Login Theme", Type.EXPERIMENTAL),
LOGIN2("New Login Theme", Type.DEFAULT),

LOGIN1("Legacy Login Theme", Type.DEPRECATED),

DOCKER("Docker Registry protocol", Type.DISABLED_BY_DEFAULT),

Expand Down
8 changes: 7 additions & 1 deletion docs/documentation/release_notes/topics/26_0_0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,10 @@ For more details, see link:{adminguide_link}#_ldap_connection_pool[Configuring t

The `java-keystore` key provider, which allows loading a realm key from an external java keystore file, has been modified to manage all {project_name} algorithms. Besides, the keystore and key secrets, needed to retrieve the actual key from the store, can be configured using the link:{adminguide_link}#_vault-administration[vault]. Therefore a {project_name} realm can externalize any key to the encrypted file without sensitive data stored in the database.

For more information about this subject, see link:{adminguide_link}#realm_keys[Configuring realm keys].
For more information about this subject, see link:{adminguide_link}#realm_keys[Configuring realm keys].

= Deprecating `keycloak` login theme

The `keycloak` login theme has been deprecated in favour of the new `keycloak.v2` and will be removed in a future version.
While it remains the default for the new realms for compatibility reasons, it is strongly recommended to switch all the
realm themes to `keycloak.v2`.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ default String getDefaultThemeName(Theme.Type type) {
return DEFAULT_V2;
}

if ((type == Theme.Type.LOGIN) && Profile.isFeatureEnabled(Profile.Feature.LOGIN2)) {
return DEFAULT_V2;
}
// if ((type == Theme.Type.LOGIN) && Profile.isFeatureEnabled(Profile.Feature.LOGIN2)) {
// return DEFAULT_V2;
// }

return DEFAULT;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void testServerInfo() {
Assert.assertNames(info.getThemes().get("account"), "base", "keycloak.v3", "custom-account-provider");
Assert.assertNames(info.getThemes().get("admin"), "base", "keycloak.v2");
Assert.assertNames(info.getThemes().get("email"), "base", "keycloak");
Assert.assertNames(info.getThemes().get("login"), "address", "base", "environment-agnostic", "keycloak", "organization");
Assert.assertNames(info.getThemes().get("login"), "address", "base", "environment-agnostic", "keycloak", "keycloak.v2", "organization");
Assert.assertNames(info.getThemes().get("welcome"), "keycloak");

assertNotNull(info.getEnums());
Expand Down

0 comments on commit a7374f9

Please sign in to comment.