The example code for this chapter can be find in the GitHub repository associated with this book. If you have Git installed, you can clone the repository by running this command in a terminal:
$ git clone https://github.com/PacktPublishing/Keycloak-Identity-and-Access-Management-for-Modern-Applications.git
Alternatively, you can download a ZIP of the repository from https://github.com/PacktPublishing/Keycloak-Identity-and-Access-Management-for-Modern-Applications/archive/master.zip.
After cloning or extracting the repository, take a look at the
ch7 directory, which is where all the examples are located.
Before we begin, you need to run Keycloak on a different port. For that, start the server, as follows:
$ cd $KC_HOME $ bin/standalone.sh -Djboss.socket.binding.port-offset=100
If you are using Docker, you should run the following command to start the server:
$ docker run -e KEYCLOAK_USER=admin \ ...