This repository contains a customized theme for Keycloak, an open-source identity and access management solution. The customized theme allows you to modify the look and feel of the Keycloak user interface to align with your branding and user experience requirements.
For local development, you can use Docker Compose to quickly spin up a Keycloak instance. This allows you to test your theme customizations without affecting your production environment.
To use Docker Compose:
- Install Docker and Docker Compose on your machine.
- Open a terminal and navigate to the repository's root directory.
- Run the following command:
docker-compose up -d
- Wait for the Keycloak container to start.
- Access the Keycloak admin console by visiting
http://localhost:8080/auth/admin/
. - Log in using the default admin credentials (username:
admin
, password:admin
). - Follow the steps mentioned in the "Installation" section to apply and test your customized theme.
To stop the Keycloak container, run docker-compose down
.
To customize the Keycloak theme for your specific needs, you can follow these steps:
- Clone this repository to your local machine.
- Navigate to the
themes/custom-theme
folder. - Modify the template files (e.g., HTML, CSS) and resources (e.g., images) according to your branding and design requirements.
- Update any necessary configurations or properties related to the theme customization.
- Save your changes.
To package the customized theme into a JAR file for use with Keycloak, you can use the provided shell script:
- Ensure you have Java and the
jar
command installed on your system. - Open a terminal and navigate to the repository's root directory.
- Run the following command:
./package.sh
- Follow the prompts to provide the JAR file name and confirm the customization.
The script will create a JAR file containing the customized theme and place it in the providers
directory.
To install and use the customized theme in Keycloak:
- Copy the generated JAR file (
custom-theme.jar
) from theproviders
directory to the Keycloak server'sstandalone/deployments
directory. - Start or restart the Keycloak server.
- Log in to the Keycloak admin console.
- Navigate to the desired realm.
- Go to the "Realm Settings" > "Themes" section.
- Select the customized theme from the available options for each desired theme (e.g., Login, Account, Admin).
- Save the changes.
The customized theme will now be applied to the corresponding Keycloak pages.
If you find any issues or have suggestions for improvement, please feel free to contribute by opening an issue or submitting a pull request. Your contributions are greatly appreciated.
This repository is licensed under the MIT License.